/* ═══════════════════════════════════════════════════════════════════
   DESTINS CROISÉS — 24H DANS LA MÉTROPOLE
   Feuille de style principale
   ═══════════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700;800&family=Outfit:wght@400;600;700;800&display=swap');

/* ─── VARIABLES ──────────────────────────────────────────────────── */
:root {
    --fatigue-color: #e74c3c;
    --stress-color: #8e44ad;
    --argent-color: #27ae60;
    --peda-gold: #f39c12;
    --peda-gold-bg: rgba(243,156,18,0.15);
    --modal-bg: rgba(12, 16, 28, 0.96);
    --modal-border: rgba(255,255,255,0.12);
    --text-primary: #ecf0f1;
    --text-secondary: #bdc3c7;
    --montreal-blue: #2980b9;
    --saopaulo-orange: #e67e22;
    --success-green: #2ecc71;
    --font-main: 'Outfit', 'Inter', system-ui, sans-serif;
    --radius: 14px;
    --radius-sm: 8px;
}

/* ─── RESET & BASE ───────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body {
    width: 100%; height: 100%;
    overflow: hidden;
    background: #0a0a12;
    font-family: var(--font-main);
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
}

/* ─── CANVAS ─────────────────────────────────────────────────────── */
#gameCanvas {
    display: block;
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    image-rendering: pixelated;
}

/* ─── UI LAYER ───────────────────────────────────────────────────── */
#ui-layer {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    pointer-events: none;
    z-index: 10;
}
#ui-layer > * { pointer-events: auto; }

/* ─── HUD ────────────────────────────────────────────────────────── */
#hud {
    position: absolute;
    top: 12px; left: 12px;
    background: rgba(0, 0, 0, 0.72);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: var(--radius);
    padding: 10px 14px;
    min-width: 190px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    pointer-events: none;
    box-shadow: 0 4px 24px rgba(0,0,0,0.4);
}
.hud-row {
    display: flex;
    align-items: center;
    gap: 8px;
}
.hud-label {
    font-size: 16px;
    line-height: 1;
    flex-shrink: 0;
    width: 20px;
    text-align: center;
}
.gauge-track {
    flex: 1;
    height: 10px;
    background: rgba(255,255,255,0.1);
    border-radius: 99px;
    overflow: hidden;
}
.gauge-bar {
    height: 100%;
    border-radius: 99px;
    transition: width 0.4s ease, background 0.4s ease;
    width: 0%;
}
.fatigue-bar { background: var(--fatigue-color); }
.stress-bar  { background: var(--stress-color); }
.hud-argent {
    font-size: 13px;
    font-weight: 600;
    color: #f1c40f;
    gap: 6px;
}
#gauge-argent-val { font-variant-numeric: tabular-nums; }
#hud-heure {
    font-size: 11px;
    color: var(--text-secondary);
    margin-top: 2px;
}
#hud-location {
    font-size: 11px;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ─── AUDIO CONTROL ──────────────────────────────────────────────── */
#audio-control-container {
    position: absolute;
    top: 12px; right: 12px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
    z-index: 20;
}
.audio-btn {
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.15);
    color: white;
    font-size: 20px;
    border-radius: 50%;
    width: 42px; height: 42px;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: transform 0.15s ease;
}
.audio-btn:hover { transform: scale(1.1); }
#save-btn { margin-bottom: 6px; }

/* ─── JOYSTICK ───────────────────────────────────────────────────── */
#joystick-base {
    display: none;
    position: fixed;
    width: 110px; height: 110px;
    background: rgba(255,255,255,0.08);
    border: 2px solid rgba(255,255,255,0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    z-index: 15;
    pointer-events: none;
}
#joystick-stick {
    position: absolute;
    top: 50%; left: 50%;
    width: 44px; height: 44px;
    background: rgba(255,255,255,0.4);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    border: 2px solid rgba(255,255,255,0.6);
}

/* ─── BOUTON ACTION ──────────────────────────────────────────────── */
#action-btn {
    position: absolute;
    bottom: 28px; right: 28px;
    width: 72px; height: 72px;
    /* Même correction que .btn : #2980b9 ne donnait que 4,30:1 avec le texte
       blanc. Mesuré sur cet élément, que audit-contrast.mjs n'ouvre pas
       puisqu'il n'atteint jamais l'écran de jeu. */
    background: linear-gradient(135deg, #1f74ad, #1f4e79);
    color: white;
    font-family: var(--font-main);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(41,128,185,0.5);
    transition: transform 0.1s ease, box-shadow 0.2s;
    user-select: none;
    -webkit-user-select: none;
}
#action-btn:active { transform: scale(0.93); }

/* ─── MODALES (base commune) ─────────────────────────────────────── */
.modal {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 100;
    padding: 16px;
}
.modal.hidden { display: none; }
.hidden { display: none; }
.modal-content {
    background: var(--modal-bg);
    border: 1px solid var(--modal-border);
    border-radius: var(--radius);
    padding: 24px;
    width: 100%;
    max-width: 480px;
    max-height: 85vh;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.3) transparent;
    box-shadow: 0 20px 60px rgba(0,0,0,0.6);
    animation: slideUp 0.3s ease;
}
.modal-content::-webkit-scrollbar {
    width: 6px;
}
.modal-content::-webkit-scrollbar-track {
    background: transparent;
}
.modal-content::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.25);
    border-radius: 3px;
}
.modal-content::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.45);
}
@keyframes slideUp {
    from { transform: translateY(30px); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
}
.btn {
    display: block;
    width: 100%;
    padding: 12px 20px;
    margin: 8px 0;
    /* Le premier arrêt doit tenir 4,5:1 avec le texte blanc : #2980b9 ne
       donnait que 4,30:1 (bouton « Sauvegardes » de l'accueil), mesuré par
       audit-contrast.mjs sur les trois résolutions. */
    background: linear-gradient(135deg, #1f74ad, #1f4e79);
    color: white;
    font-family: var(--font-main);
    font-size: 14px;
    font-weight: 600;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: transform 0.1s, opacity 0.2s;
    text-align: center;
}
.btn:hover { opacity: 0.9; transform: translateY(-1px); }
.btn:active { transform: scale(0.97); }

/* ─── ÉCRAN D'ACCUEIL / MENU PRINCIPAL ───────────────────────────── */
.start-modal-content {
    max-width: 560px;
    text-align: center;
}
.start-header { margin-bottom: 16px; }
.start-title {
    font-size: 32px;
    font-weight: 800;
    background: linear-gradient(135deg, #7dd3fc, #c4b5fd, #fcd34d);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 4px;
}
.start-subtitle {
    font-size: 15px;
    color: var(--text-secondary);
    margin-bottom: 10px;
}
.start-desc {
    font-size: 13px;
    line-height: 1.5;
    color: var(--text-secondary);
    max-width: 400px;
    margin: 0 auto;
}
.main-menu-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 14px;
}
.main-menu-btn {
    background: rgba(255,255,255,0.04);
    border: 1.5px solid rgba(255,255,255,0.1);
    border-radius: var(--radius);
    padding: 14px 12px;
    cursor: pointer;
    transition: transform 0.15s ease, border-color 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: white;
    font-family: var(--font-main);
    text-align: center;
}
.main-menu-btn:hover {
    transform: translateY(-3px);
    border-color: rgba(255,255,255,0.3);
    box-shadow: 0 8px 30px rgba(0,0,0,0.4);
}
.menu-play-leo:hover { border-color: var(--montreal-blue); box-shadow: 0 8px 30px rgba(41,128,185,0.3); }
.menu-play-sofia:hover { border-color: var(--saopaulo-orange); box-shadow: 0 8px 30px rgba(230,126,34,0.3); }
.menu-load:hover { border-color: #f1c40f; box-shadow: 0 8px 30px rgba(241,196,15,0.25); }
.menu-save:hover { border-color: #2ecc71; box-shadow: 0 8px 30px rgba(46,204,113,0.25); }
.menu-btn-flag { font-size: 24px; }
.menu-btn-label {
    font-size: 15px;
    font-weight: 700;
}
.menu-btn-desc {
    font-size: 11px;
    line-height: 1.3;
    color: var(--text-secondary);
}
.start-controls {
    font-size: 11px;
    color: rgba(255,255,255,0.5);
    margin-top: 4px;
}

/* ─── MODALE NARRATIVE ───────────────────────────────────────────── */
.narrative-modal-content {
    max-width: 500px;
    padding: 20px;
    background: rgba(8, 12, 24, 0.97);
    border: 1px solid rgba(255,255,255,0.15);
}
.narrative-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}
.narrative-icon-big { font-size: 28px; }
.narrative-location-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
}
.narrative-text-box {
    background: rgba(255,255,255,0.04);
    border-left: 3px solid rgba(52,152,219,0.6);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    padding: 12px 14px;
    margin-bottom: 14px;
    min-height: 60px;
}
#narrative-text {
    font-size: 16px;
    line-height: 1.6;
    color: #ffffff;
    font-style: normal;
    font-weight: 500;
}
.narrative-choices {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 12px;
}
.narrative-choice-btn {
    padding: 12px 16px;
    background: rgba(255,255,255,0.09);
    border: 1.5px solid rgba(255,255,255,0.25);
    border-radius: var(--radius-sm);
    color: #ffffff;
    font-family: var(--font-main);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    text-align: left;
    transition: background 0.15s, border-color 0.15s, transform 0.1s;
    line-height: 1.45;
}
.narrative-choice-btn:hover:not(:disabled) {
    background: rgba(52,152,219,0.25);
    border-color: rgba(52,152,219,0.7);
    transform: translateX(3px);
}
.narrative-choice-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.narrative-choice-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
    border-color: rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.02);
}
.narrative-choice-btn:disabled:hover {
    background: rgba(255,255,255,0.02);
    border-color: rgba(255,255,255,0.08);
    transform: none;
}

/* ─── BULLE PÉDAGOGIQUE DORÉE ────────────────────────────────────── */
.pedagogique-bubble {
    background: var(--peda-gold-bg);
    border: 1.5px solid var(--peda-gold);
    border-radius: var(--radius);
    padding: 14px 16px;
    margin-top: 6px;
    animation: fadeIn 0.4s ease;
}
.pedagogique-bubble.hidden { display: none; }
.peda-inner {
    margin-bottom: 12px;
}
#narrative-peda-text {
    font-size: 15px;
    line-height: 1.55;
    color: #fffbeb;
    font-weight: 500;
}
.narrative-continue-btn {
    display: block;
    width: 100%;
    padding: 10px;
    background: linear-gradient(135deg, var(--peda-gold), #d68910);
    color: white;
    font-family: var(--font-main);
    font-size: 14px;
    font-weight: 700;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: opacity 0.2s, transform 0.1s;
}
.narrative-continue-btn:hover { opacity: 0.9; transform: translateY(-1px); }
.narrative-continue-btn:active { transform: scale(0.97); }
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ─── TRANSITION D'ACTE ──────────────────────────────────────────── */
.act-transition {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.88);
    z-index: 200;
    animation: fadeIn 0.3s ease;
}
.act-transition.hidden { display: none; }
.act-transition-inner { text-align: center; }
.act-transition-text {
    font-size: 36px;
    font-weight: 800;
    color: white;
    margin-bottom: 8px;
}
.act-transition-sub {
    font-size: 16px;
    color: var(--text-secondary);
}

/* ─── ÉCRAN DE BILAN FINAL ───────────────────────────────────────── */
.end-modal-content {
    max-width: 480px;
    text-align: center;
}
.end-title {
    font-size: 26px;
    font-weight: 800;
    margin-bottom: 4px;
}
.end-character {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 20px;
}
.end-gauges {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
    text-align: left;
}
.end-gauge-row {
    display: flex;
    align-items: center;
    gap: 10px;
}
.end-gauge-label {
    font-size: 14px;
    font-weight: 600;
    width: 90px;
    flex-shrink: 0;
}
.end-gauge-track {
    flex: 1;
    height: 14px;
}
.end-gauge-val {
    font-size: 13px;
    font-weight: 600;
    width: 60px;
    text-align: right;
    flex-shrink: 0;
}
.end-argent { color: #f1c40f; }
.end-concepts {
    background: rgba(46,204,113,0.08);
    border: 1px solid rgba(46,204,113,0.3);
    border-radius: var(--radius-sm);
    padding: 14px 16px;
    text-align: left;
    margin-bottom: 20px;
}
.end-concepts h4 {
    font-size: 13px;
    font-weight: 700;
    color: var(--success-green);
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
#end-concepts-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 5px;
}
#end-concepts-list li {
    font-size: 13px;
    color: #a9dfbf;
    line-height: 1.4;
}
.end-buttons { display: flex; flex-direction: column; gap: 8px; }
.end-btn-replay {
    background: linear-gradient(135deg, #27ae60, #1e8449);
    box-shadow: 0 4px 20px rgba(39,174,96,0.35);
}
.end-btn-menu {
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.15);
}

/* ─── POINTS D'INTÉRÊT — ANIMATION PULSE ────────────────────────── */
@keyframes poiPulse {
    0%   { transform: scale(1);   opacity: 1; }
    50%  { transform: scale(1.18); opacity: 0.75; }
    100% { transform: scale(1);   opacity: 1; }
}

/* ─── BOUTON METRO ───────────────────────────────────────────────── */
.metro-btn {
    display: block;
    width: 100%;
    padding: 10px 14px;
    margin: 6px 0;
    background: rgba(52,152,219,0.2);
    border: 1px solid #2980b9;
    border-radius: var(--radius-sm);
    color: white;
    font-family: var(--font-main);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    text-align: left;
    transition: background 0.15s;
}
.metro-btn:hover { background: rgba(52,152,219,0.4); }

/* ─── RESPONSIVE MOBILE ──────────────────────────────────────────── */
@media (max-width: 480px) {
    .character-select-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
    .character-card { padding: 12px 8px; }
    .character-name { font-size: 16px; }
    .modal-content { padding: 16px; }
    .start-title { font-size: 26px; }
    #hud { min-width: 160px; }
}
@media (max-width: 360px) {
    .character-select-grid { grid-template-columns: 1fr; }
}

/* ═══════════════════════════════════════════════════════════════════
   QUEST DASHBOARD — Journal de quêtes accessible
   ═══════════════════════════════════════════════════════════════════ */

/* ─── BOUTON TOGGLE ──────────────────────────────────────────────── */
.quest-toggle-btn {
    position: absolute;
    top: 12px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 7px;
    background: rgba(0,0,0,0.75);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1.5px solid rgba(255,255,255,0.15);
    border-radius: 99px;
    padding: 7px 18px 7px 13px;
    color: #ecf0f1;
    font-family: var(--font-main);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    z-index: 20;
    transition: background 0.2s, border-color 0.2s, box-shadow 0.2s;
    letter-spacing: 0.3px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.4);
}
.quest-toggle-btn:hover,
.quest-toggle-btn:focus-visible {
    background: rgba(41,128,185,0.35);
    border-color: rgba(52,152,219,0.7);
    outline: none;
    box-shadow: 0 0 0 3px #3498db, 0 4px 20px rgba(0,0,0,0.4);
}
.quest-toggle-btn[aria-expanded="true"] {
    background: rgba(41,128,185,0.55);
    border-color: rgba(52,152,219,0.8);
}
.quest-toggle-icon { font-size: 16px; }
.quest-toggle-label { white-space: nowrap; }
.quest-badge {
    min-width: 18px;
    height: 18px;
    background: #e74c3c;
    color: white;
    font-size: 10px;
    font-weight: 800;
    border-radius: 99px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    animation: badgePulse 2s infinite;
}
.quest-badge.hidden { display: none; }
@keyframes badgePulse {
    0%, 100% { transform: scale(1); }
    50%       { transform: scale(1.18); }
}

/* ─── PANEL PRINCIPAL ────────────────────────────────────────────── */
.quest-dashboard {
    position: absolute;
    top: 62px;
    left: 50%;
    transform: translateX(-50%) translateY(-10px);
    width: min(390px, calc(100vw - 24px));
    background: rgba(8,12,24,0.97);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1.5px solid rgba(255,255,255,0.12);
    border-radius: 18px;
    box-shadow: 0 24px 60px rgba(0,0,0,0.7), 0 0 0 1px rgba(52,152,219,0.08);
    z-index: 19;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.28s cubic-bezier(0.34,1.56,0.64,1);
}
.quest-dashboard.open {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
}

/* ─── HEADER ─────────────────────────────────────────────────────── */
.quest-dashboard-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 18px 12px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    background: linear-gradient(135deg, rgba(41,128,185,0.15), rgba(142,68,173,0.08));
}
.quest-dashboard-title {
    display: flex;
    align-items: center;
    gap: 8px;
}
.quest-dashboard-icon { font-size: 20px; }
.quest-dashboard-title h2 {
    font-size: 15px;
    font-weight: 800;
    color: #ecf0f1;
    letter-spacing: 0.3px;
}
.quest-close-btn {
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 50%;
    width: 30px; height: 30px;
    display: flex; align-items: center; justify-content: center;
    color: rgba(255,255,255,0.6);
    font-size: 13px;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    font-family: var(--font-main);
}
.quest-close-btn:hover,
.quest-close-btn:focus-visible {
    background: rgba(231,76,60,0.3);
    color: white;
    border-color: rgba(231,76,60,0.5);
    outline: none;
    box-shadow: 0 0 0 3px rgba(52,152,219,0.4);
}

/* ─── ACT LABEL ──────────────────────────────────────────────────── */
.quest-act-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: rgba(52,152,219,0.9);
    padding: 10px 18px 6px;
}

/* ─── LISTE DES QUÊTES ───────────────────────────────────────────── */
.quest-list {
    list-style: none;
    padding: 0 10px 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-height: 360px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(52,152,219,0.3) transparent;
}
.quest-list::-webkit-scrollbar { width: 4px; }
.quest-list::-webkit-scrollbar-thumb { background: rgba(52,152,219,0.3); border-radius: 4px; }

/* ─── SÉPARATEUR D'ACTE ──────────────────────────────────────────── */
.quest-act-divider {
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: rgba(255,255,255,0.22);
    padding: 8px 12px 4px;
    display: flex;
    align-items: center;
    gap: 8px;
    list-style: none;
}
.quest-act-divider::before,
.quest-act-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(255,255,255,0.07);
}

/* ─── ITEM DE QUÊTE ──────────────────────────────────────────────── */
.quest-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1.5px solid transparent;
    background: rgba(255,255,255,0.03);
    transition: background 0.2s, border-color 0.2s, transform 0.15s;
    cursor: default;
}
/* Complété */
.quest-item.completed {
    border-color: rgba(46,204,113,0.2);
    background: rgba(46,204,113,0.05);
    opacity: 0.7;
}
/* Actif */
.quest-item.active {
    border-color: rgba(52,152,219,0.5);
    background: rgba(52,152,219,0.1);
    animation: questGlow 2.5s ease-in-out infinite;
    cursor: pointer;
}
.quest-item.active:hover {
    background: rgba(52,152,219,0.17);
    transform: translateX(2px);
}
.quest-item.active:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(52,152,219,0.6);
}
@keyframes questGlow {
    0%, 100% { box-shadow: 0 0 0 1px rgba(52,152,219,0.12) inset; }
    50%       { box-shadow: 0 0 0 1px rgba(52,152,219,0.35) inset, 0 0 14px rgba(52,152,219,0.1); }
}
/* Verrouillé */
.quest-item.locked {
    opacity: 0.38;
    filter: grayscale(0.5);
}

/* ─── NUMÉRO D'ORDRE ─────────────────────────────────────────────── */
.quest-number {
    width: 26px; height: 26px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 12px; font-weight: 800;
    flex-shrink: 0;
    margin-top: 1px;
}
.completed .quest-number {
    background: rgba(46,204,113,0.18);
    color: #2ecc71;
    border: 1.5px solid rgba(46,204,113,0.4);
}
.active .quest-number {
    background: rgba(52,152,219,0.22);
    color: #3498db;
    border: 1.5px solid rgba(52,152,219,0.6);
    animation: numPulse 1.6s ease-in-out infinite;
}
@keyframes numPulse {
    0%, 100% { box-shadow: none; }
    50%       { box-shadow: 0 0 0 5px rgba(52,152,219,0.15); }
}
.locked .quest-number {
    background: rgba(255,255,255,0.05);
    color: rgba(255,255,255,0.25);
    border: 1.5px solid rgba(255,255,255,0.1);
}

/* ─── CONTENU TEXTE ──────────────────────────────────────────────── */
.quest-content { flex: 1; min-width: 0; }
.quest-name {
    font-size: 13px;
    font-weight: 700;
    color: #ecf0f1;
    line-height: 1.35;
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
}
.completed .quest-name {
    color: rgba(255,255,255,0.4);
    text-decoration: line-through;
    text-decoration-color: rgba(46,204,113,0.45);
}
.locked .quest-name { color: rgba(255,255,255,0.28); }
.quest-location {
    font-size: 11px;
    color: rgba(255,255,255,0.38);
    margin-top: 3px;
    display: flex;
    align-items: center;
    gap: 3px;
}
.active .quest-location { color: rgba(52,152,219,0.75); }

/* ─── ICÔNE FLÈCHE / VERROU ──────────────────────────────────────── */
.quest-side-icon {
    font-size: 14px;
    flex-shrink: 0;
    margin-top: 4px;
}
.quest-item.active .quest-side-icon {
    color: rgba(52,152,219,0.95);
    animation: arrowBounce 0.75s ease-in-out infinite alternate;
}
@keyframes arrowBounce {
    from { transform: translateX(0); }
    to   { transform: translateX(4px); }
}
.quest-item.locked .quest-side-icon { color: rgba(255,255,255,0.2); }
.quest-item.completed .quest-side-icon { color: #2ecc71; }

/* ─── HINT BAS DU PANEL ──────────────────────────────────────────── */
.quest-dashboard-hint {
    padding: 10px 18px 14px;
    font-size: 11px;
    color: rgba(255,255,255,0.5);
    display: flex;
    align-items: center;
    gap: 6px;
    border-top: 1px solid rgba(255,255,255,0.05);
    margin-top: 4px;
}

/* ─── MODALE SAUVEGARDE ──────────────────────────────────────────── */
.save-modal-content {
    max-width: 520px;
    text-align: left;
}
.save-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}
.save-header h2 {
    font-size: 20px;
    font-weight: 700;
}
.save-list {
    max-height: 260px;
    overflow-y: auto;
    margin-bottom: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.save-slot {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: var(--radius-sm);
    padding: 10px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}
.save-slot:hover {
    background: rgba(255,255,255,0.08);
    border-color: rgba(255,255,255,0.2);
}
.save-slot-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    min-width: 0;
}
.save-slot-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}
.save-slot-meta {
    font-size: 11px;
    color: var(--text-secondary);
}
.save-slot-actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}
.save-slot-actions button {
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 6px;
    color: white;
    font-size: 12px;
    padding: 5px 10px;
    cursor: pointer;
    transition: background 0.15s;
}
.save-slot-actions button:hover {
    background: rgba(255,255,255,0.15);
}
.save-slot-actions .slot-delete-btn:hover {
    background: rgba(231,76,60,0.25);
    border-color: rgba(231,76,60,0.5);
}
.save-empty {
    text-align: center;
    color: var(--text-secondary);
    font-size: 13px;
    padding: 20px;
}
.save-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* ─── MODALE CARTE ─────────────────────────────────────────────────── */
.map-modal-content {
    max-width: 700px;
    text-align: left;
    padding: 18px;
}
.map-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}
.map-header h2 {
    font-size: 20px;
    font-weight: 700;
}
.map-canvas-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}
#map-canvas {
    width: 100%;
    max-width: 600px;
    height: auto;
    aspect-ratio: 1 / 1;
    background: #0f1724;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(255,255,255,0.08);
}
.map-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 14px;
    justify-content: center;
    font-size: 12px;
    color: var(--text-secondary);
}
.map-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.map-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}
.map-hint {
    text-align: center;
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 8px;
}

/* ─── MODALE COMPARATIF ────────────────────────────────────────────── */
.comparison-modal-content {
    max-width: 720px;
    text-align: center;
}
.comparison-header {
    margin-bottom: 18px;
}
.comparison-header h2 {
    font-size: 22px;
    font-weight: 800;
    margin-bottom: 4px;
}
.comparison-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
}
.comparison-columns {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 14px;
    align-items: start;
    margin-bottom: 18px;
}
.comparison-col {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: var(--radius);
    padding: 16px;
}
.comparison-next {
    border-color: rgba(46,204,113,0.25);
}
.comparison-avatar {
    font-size: 40px;
    line-height: 1;
    margin-bottom: 8px;
}
.comparison-col h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 2px;
}
.comparison-city {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 10px;
}
.comparison-vs {
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 14px;
    color: var(--text-secondary);
    padding-top: 40px;
}
.comparison-metrics {
    display: flex;
    flex-direction: column;
    gap: 8px;
    text-align: left;
}
.comparison-metric {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    padding: 6px 8px;
    background: rgba(255,255,255,0.03);
    border-radius: var(--radius-sm);
}
.comparison-metric-label {
    color: var(--text-secondary);
}
.comparison-metric-val {
    font-weight: 700;
    color: var(--text-primary);
}
.comparison-hint {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 8px;
}
.comparison-insights {
    text-align: left;
    background: rgba(243,156,18,0.08);
    border: 1px solid rgba(243,156,18,0.18);
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    margin-bottom: 16px;
}
.comparison-insights p {
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 6px;
}
.comparison-insights p:last-child {
    margin-bottom: 0;
}
.comparison-continue-btn {
    font-size: 16px;
    padding: 12px 24px;
    background: linear-gradient(135deg, #27ae60, #1e8449);
}

/* ─── RESPONSIVE ─────────────────────────────────────────────────── */
@media (max-width: 480px) {
    .quest-toggle-btn { top: 8px; padding: 6px 14px 6px 10px; font-size: 12px; }
    .quest-dashboard { top: 54px; width: calc(100vw - 16px); }
    .main-menu-grid { grid-template-columns: 1fr; }
}

/* Identité du joueur et récompenses de motivation */
.player-identity {
    display: grid;
    gap: 8px;
    margin-bottom: 14px;
    padding: 12px 14px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.08);
}

.player-identity label {
    font-weight: 800;
    font-size: 0.9rem;
}

#player-name-input {
    width: 100%;
    min-height: 42px;
    padding: 0 12px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    background: rgba(0, 0, 0, 0.35);
    color: #fff;
    font: inherit;
    font-weight: 700;
}

.avatar-select {
    display: flex;
    gap: 8px;
}

.avatar-option {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.08);
    font-size: 1.3rem;
    cursor: pointer;
}

.avatar-option.selected {
    border-color: #f1c40f;
    background: rgba(241, 196, 15, 0.18);
}

.avatar-option:hover,
.avatar-option:focus-visible {
    outline: 2px solid #7dd3fc;
    outline-offset: 2px;
}

.end-player-name,
.end-day-title {
    margin: 4px 0;
    font-weight: 800;
}

.end-day-title {
    color: #f1c40f;
}

.end-journal {
    margin-top: 14px;
    padding: 12px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.07);
}

.end-journal h4 {
    margin: 0 0 8px;
}

.end-journal ul {
    margin: 0;
    padding-left: 18px;
    line-height: 1.5;
}

#act-reward {
    position: fixed;
    inset: 0;
    z-index: 99990;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 8px;
    background: rgba(0, 0, 0, 0.72);
    color: #fff;
    font-family: 'Outfit', system-ui, sans-serif;
    text-align: center;
}

#act-reward strong {
    font-size: 1.6rem;
}

#act-reward span {
    font-size: 2.2rem;
    letter-spacing: 0;
}

/* Statut BIXI (HUD) */
.hud-bixi {
    gap: 8px;
    align-items: center;
    font-size: 13px;
    color: #ecf0f1;
}

.hud-bixi #bixi-energy {
    font-weight: bold;
    color: #3498db;
}
