﻿.pm-app{
    --pm-blue:#2563eb;
    --pm-blue-dark:#1d4ed8;
    --pm-green:#22c55e;
    --pm-orange:#f59e0b;
    --pm-purple:#7c3aed;
    --pm-bg:#eef6ff;
    --pm-card:#ffffff;
    --pm-text:#111827;
    --pm-muted:#64748b;

    display:grid;
    grid-template-columns:280px minmax(0,1fr)260px;
    gap:22px;
    min-height:calc(100vh - 120px);
    padding:22px;

    background:
        radial-gradient(circle at 10% 8%,rgba(96,165,250,.24),transparent 28%),
        radial-gradient(circle at 92% 12%,rgba(34,197,94,.14),transparent 26%),
        linear-gradient(180deg,#f8fbff 0%,#eaf4ff 100%);

    color:var(--pm-text);
    font-family:Inter,"Segoe UI",Arial,sans-serif;
}

.pm-app *{
    box-sizing:border-box;
}

.pm-sidebar,
.pm-rightbar{
    position:sticky;
    top:92px;
    align-self:start;
}

.pm-profile-card,
.pm-card,
.pm-daily-card,
.pm-hero{
    background:rgba(255,255,255,.9);
    border:1px solid rgba(148,163,184,.22);
    border-radius:28px;
    box-shadow:0 20px 45px rgba(37,99,235,.08);
    backdrop-filter:blur(12px);
}

.pm-profile-card{
    display:flex;
    align-items:center;
    gap:14px;
    padding:18px;
}

.pm-avatar{
    width:58px;
    height:58px;
    border-radius:22px;
    display:grid;
    place-items:center;
    background:linear-gradient(135deg,#3b82f6,#1d4ed8);
    color:#fff;
    font-size:2rem;
    box-shadow:0 14px 26px rgba(37,99,235,.23);
}

.pm-hello{
    font-size:.82rem;
    color:var(--pm-muted);
    font-weight:800;
}

.pm-username{
    font-weight:1000;
    font-size:1.08rem;
    letter-spacing:-.02em;
}

.pm-stat-grid{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:12px;
    margin:16px 0;
}

.pm-stat{
    background:rgba(255,255,255,.92);
    border-radius:22px;
    padding:15px;
    text-align:center;
    border:1px solid #dbeafe;
    box-shadow:0 12px 28px rgba(15,23,42,.05);
}

.pm-stat span{
    display:block;
    font-size:1.25rem;
    font-weight:1000;
}

.pm-stat small{
    color:var(--pm-muted);
    font-weight:800;
}

.pm-daily-card,
.pm-card{
    padding:18px;
    margin-bottom:16px;
}

.pm-card-title{
    font-weight:1000;
    margin-bottom:12px;
    letter-spacing:-.02em;
}

.pm-progress-line{
    height:13px;
    border-radius:999px;
    background:#e2e8f0;
    overflow:hidden;
    box-shadow:inset 0 1px 2px rgba(15,23,42,.08);
}

.pm-progress-line span{
    display:block;
    height:100%;
    width:0%;
    border-radius:999px;
    background:linear-gradient(90deg,#22c55e,#84cc16);
    transition:.35s;
}

.pm-daily-text{
    margin-top:8px;
    color:var(--pm-muted);
    font-weight:850;
}

.pm-main{
    min-width:0;
}

.pm-hero{
    position:relative;
    overflow:hidden;
    display:flex;
    justify-content:space-between;
    gap:18px;
    align-items:center;
    padding:24px 28px;
    margin-bottom:18px;
    background:linear-gradient(135deg,rgba(255,255,255,.96) 0%,rgba(219,234,254,.94) 100%);
}

.pm-hero:after{
    content:"";
    position:absolute;
    right:-70px;
    top:-80px;
    width:230px;
    height:230px;
    border-radius:50%;
    background:radial-gradient(circle,rgba(37,99,235,.16),transparent 68%);
    pointer-events:none;
}

.pm-kicker{
    margin:0 0 6px;
    font-weight:1000;
    color:var(--pm-blue-dark);
    text-transform:uppercase;
    letter-spacing:.1em;
    font-size:.78rem;
}

.pm-hero h1{
    margin:0;
    font-size:clamp(1.65rem,3vw,2.75rem);
    line-height:1;
    letter-spacing:-.055em;
}

.pm-hero p{
    margin:10px 0 0;
    color:#475569;
    font-weight:700;
}

.pm-hero-badge{
    position:relative;
    z-index:1;
    padding:13px 18px;
    border-radius:999px;
    background:linear-gradient(135deg,#2563eb,#7c3aed);
    color:white;
    font-weight:1000;
    white-space:nowrap;
    box-shadow:0 14px 28px rgba(37,99,235,.24);
}

.pm-world-tabs{
    display:flex;
    gap:10px;
    overflow:auto;
    padding:4px 0 18px;
    scrollbar-width:thin;
}

.pm-world-tab{
    border:0;
    border-radius:999px;
    padding:12px 16px;
    background:rgba(255,255,255,.92);
    font-weight:1000;
    color:#334155;
    box-shadow:0 10px 22px rgba(15,23,42,.07);
    cursor:pointer;
    transition:transform .18s ease,box-shadow .18s ease,background .18s ease;
}

.pm-world-tab:hover{
    transform:translateY(-2px);
    box-shadow:0 16px 28px rgba(15,23,42,.10);
}

.pm-world-tab.active{
    background:linear-gradient(135deg,#2563eb,#1d4ed8);
    color:white;
}

/* ========================= */
/* PARCOURS */
/* ========================= */

.pm-map{
    position:relative;
    max-width:760px;
    margin:0 auto;
    padding:30px 0 44px;
    isolation:isolate;
}

.pm-map:before{
    content:"";
    position:absolute;
    left:50%;
    top:68px;
    bottom:68px;
    width:18px;
    border-radius:999px;
    background:linear-gradient(180deg,#2563eb 0%, #06b6d4 45%, #22c55e 100%);
    box-shadow:
        inset 0 0 0 2px rgba(255,255,255,.22),
        0 0 0 6px rgba(37,99,235,.12),
        0 12px 26px rgba(37,99,235,.28);
    transform:translateX(-50%);
    z-index:1;
}

.pm-map:after{
    content:none !important;
    display:none !important;
}

.pm-node-wrap{
    position:relative;
    min-height:190px;
    z-index:3;
}

.pm-node{
    position:absolute;
    z-index:3;
    left:50%;
    top:26px;

    width:96px;
    height:96px;

    border:7px solid rgba(255,255,255,.95);
    border-radius:30px;

    display:flex;
    align-items:center;
    justify-content:center;

    background:linear-gradient(135deg,#3b82f6,#1d4ed8);
    color:white;
    font-size:0;

    cursor:pointer;
    box-shadow:
        0 16px 35px rgba(37,99,235,.16),
        0 0 30px rgba(59,130,246,.12);

    transform:translateX(-50%) rotate(45deg);
    transition:.25s ease;
    overflow:hidden;
}

.pm-node:hover{
    transform:translateX(-50%) rotate(45deg) scale(1.08);
}

.pm-node::after{
    content:"⚡";
    display:flex;
    align-items:center;
    justify-content:center;
    width:100%;
    height:100%;
    transform:rotate(-45deg);
    font-size:2.1rem;
    line-height:1;
    color:#fff;
    text-shadow:0 2px 6px rgba(0,0,0,.15);
}

.pm-node.done{
    background:linear-gradient(135deg,#22c55e,#16a34a);
}

.pm-node.done::after{
    content:"✓";
}

.pm-node.open{
    background:linear-gradient(135deg,#3b82f6,#1d4ed8);
    animation:pmNodePulse 2.2s ease-in-out infinite;
}

.pm-node.open::after{
    content:"⚡";
}

.pm-node.boss,
.pm-node.final,
.pm-node.challenge,
.pm-node-wrap:last-child .pm-node{
    background:linear-gradient(135deg,#f59e0b,#ef4444);
}

.pm-node.boss::after,
.pm-node.final::after,
.pm-node.challenge::after,
.pm-node-wrap:last-child .pm-node::after{
    content:"🏆";
}

.pm-node.locked{
    background:linear-gradient(135deg,#cbd5e1,#94a3b8);
    color:#64748b;
    cursor:not-allowed;
    filter:grayscale(.35);
    animation:none;
}

.pm-node.locked::after{
    content:"🔒";
}

.pm-node:disabled{
    cursor:not-allowed;
}

.pm-node-label{
    position:absolute;
    top:50%;
    transform:translateY(-50%);

    width:260px;
    padding:18px 18px 16px;

    background:rgba(255,255,255,.96);
    border-radius:26px;
    border:1px solid rgba(255,255,255,.7);

    box-shadow:
        0 18px 40px rgba(15,23,42,.08),
        0 6px 14px rgba(37,99,235,.06);

    backdrop-filter:blur(10px);
    transition:.25s ease;
}

.pm-node-label:hover{
    transform:translateY(-50%) scale(1.03);
}

.pm-node-label:before{
    content:"";
    position:absolute;
    top:42px;
    width:18px;
    height:18px;
    background:rgba(255,255,255,.96);
    transform:rotate(45deg);
}

.pm-node-label.left{
    right:calc(50% + 85px);
    text-align:right;
}

.pm-node-label.left:before{
    right:-8px;
}

.pm-node-label.right{
    left:calc(50% + 85px);
    text-align:left;
}

.pm-node-label.right:before{
    left:-8px;
}

.pm-node-label h3{
    margin:0 0 10px;
    font-size:1.2rem;
    line-height:1.2;
    font-weight:1000;
    letter-spacing:-0.03em;
}

.pm-node-label p{
    margin:0 0 14px;
    color:#64748b;
    font-size:.96rem;
    line-height:1.45;
    font-weight:700;
}

.pm-node-label small{
    display:block;
    margin-top:4px;
    color:#64748b;
    font-weight:700;
}

.pm-stars{
    display:inline-block;
    margin-top:11px;
    color:var(--pm-orange);
    font-size:1rem;
    letter-spacing:2px;
    text-shadow:0 1px 0 rgba(0,0,0,.06);
}

.pm-pill{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    margin-top:12px;
    padding:7px 13px;
    border-radius:999px;
    font-size:.8rem;
    font-weight:1000;
    background:#eff6ff;
    color:#1d4ed8;
}

.pm-node.done + .pm-node-label .pm-pill,
.pm-node-label .pm-pill.valid,
.pm-node-label .pm-pill.done{
    background:#dcfce7;
    color:#166534;
}

@keyframes pmNodePulse{
    0%,100%{
        box-shadow:0 16px 35px rgba(37,99,235,.16),0 0 0 0 rgba(37,99,235,.25);
    }
    50%{
        box-shadow:0 16px 35px rgba(37,99,235,.16),0 0 0 12px rgba(37,99,235,0);
    }
}

/* ========================= */
/* BLOCS DROITE */
/* ========================= */

.pm-badges{
    display:grid;
    gap:10px;
}

.pm-badges span{
    background:#f8fafc;
    border:1px solid #e2e8f0;
    border-radius:16px;
    padding:10px;
    font-weight:850;
}

.pm-card p{
    color:#475569;
    font-weight:700;
    line-height:1.45;
    margin:0;
}

/* ========================= */
/* MODALE ET QUESTIONS */
/* ========================= */

.pm-modal[hidden]{
    display:none;
}

.pm-modal{
    position:fixed;
    z-index:9999;
    inset:0;
    display:grid;
    place-items:center;
}

.pm-modal-backdrop{
    position:absolute;
    inset:0;
    background:rgba(15,23,42,.55);
    backdrop-filter:blur(5px);
}

.pm-modal-box{
    position:relative;
    z-index:1;
    width:min(680px,calc(100vw - 24px));
    max-height:calc(100vh - 40px);
    overflow:auto;
    background:white;
    border-radius:30px;
    box-shadow:0 30px 80px rgba(0,0,0,.32);
    padding:26px;
}

.pm-close{
    position:absolute;
    right:18px;
    top:14px;
    border:0;
    background:#f1f5f9;
    border-radius:50%;
    width:38px;
    height:38px;
    font-size:1.4rem;
    cursor:pointer;
}

.pm-lesson-title{
    font-size:1.55rem;
    font-weight:1000;
    margin:0 42px 8px 0;
}

.pm-mission{
    background:#eff6ff;
    border:1px solid #bfdbfe;
    border-radius:20px;
    padding:14px;
    font-weight:850;
    color:#1e3a8a;
    margin-bottom:18px;
}

.pm-question{
    font-size:1.2rem;
    font-weight:1000;
    margin:16px 0;
}

.pm-choice{
    display:block;
    width:100%;
    text-align:left;
    border:2px solid #e2e8f0;
    background:#fff;
    border-radius:18px;
    padding:14px 16px;
    margin:10px 0;
    font-weight:900;
    cursor:pointer;
    transition:.15s;
}

.pm-choice:hover{
    border-color:#60a5fa;
    background:#eff6ff;
}

.pm-choice.correct{
    border-color:#22c55e;
    background:#dcfce7;
}

.pm-choice.wrong{
    border-color:#ef4444;
    background:#fee2e2;
}

.pm-feedback{
    margin-top:16px;
    border-radius:20px;
    padding:16px;
    background:#f8fafc;
    font-weight:850;
}

.pm-next{
    margin-top:16px;
    border:0;
    border-radius:999px;
    padding:13px 18px;
    background:linear-gradient(135deg,#2563eb,#1d4ed8);
    color:#fff;
    font-weight:1000;
    cursor:pointer;
    box-shadow:0 12px 24px rgba(37,99,235,.22);
}

.pm-error{
    background:#fee2e2;
    border:1px solid #fecaca;
    color:#991b1b;
    padding:14px;
    border-radius:18px;
    font-weight:1000;
}

/* ========================= */
/* LOADER */
/* ========================= */

.pia-btn-loading{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:10px;
}

.pia-spinner{
    width:18px;
    height:18px;
    border:3px solid rgba(255,255,255,.35);
    border-top-color:#fff;
    border-radius:50%;
    animation:pia-spin .7s linear infinite;
    flex-shrink:0;
}

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

.pm-choice:disabled,
.pm-next:disabled,
.pm-node:disabled{
    cursor:not-allowed;
    opacity:.85;
}

.pm-next .pia-spinner{
    border:3px solid rgba(255,255,255,.3);
    border-top-color:#fff;
}

.pm-choice .pia-spinner{
    border:3px solid rgba(37,99,235,.25);
    border-top-color:#2563eb;
}

.pm-node .pia-spinner{
    border:3px solid rgba(255,255,255,.3);
    border-top-color:#fff;
}

.pm-loading-wrap{
    display:flex;
    align-items:center;
    justify-content:center;
    gap:10px;
}

.pm-loader{
    width:22px;
    height:22px;
    border-radius:50%;
    border:3px solid rgba(255,255,255,.25);
    border-top-color:#ffd54a;
    animation:pmSpin .8s linear infinite;
    display:flex;
    align-items:center;
    justify-content:center;
    position:relative;
}

.pm-loader-core{
    position:absolute;
    font-size:11px;
    animation:pmPulse 1s ease-in-out infinite;
}

.pm-loader-text{
    font-size:.92rem;
    font-weight:700;
    letter-spacing:.3px;
}

@keyframes pmSpin{
    to{transform:rotate(360deg);}
}

@keyframes pmPulse{
    0%{transform:scale(1);opacity:1;}
    50%{transform:scale(1.25);opacity:.7;}
    100%{transform:scale(1);opacity:1;}
}

/* ========================= */
/* RESPONSIVE */
/* ========================= */

@media(max-width:1100px){
    .pm-app{
        grid-template-columns:1fr;
    }

    .pm-sidebar,
    .pm-rightbar{
        position:static;
    }

    .pm-rightbar{
        display:none;
    }
}

@media(max-width:760px){
    .pm-app{
        padding:12px;
    }

    .pm-hero{
        display:block;
        padding:20px;
    }

    .pm-hero-badge{
        display:inline-block;
        margin-top:14px;
    }

    .pm-map{
        max-width:100%;
        padding:24px 0 20px;
    }

    .pm-map:before{
        left:38px;
        top:58px;
        bottom:58px;
        width:16px;
        background:linear-gradient(180deg,#2563eb 0%, #06b6d4 45%, #22c55e 100%);
        box-shadow:
            inset 0 0 0 2px rgba(255,255,255,.22),
            0 0 0 5px rgba(37,99,235,.12),
            0 10px 22px rgba(37,99,235,.25);
    }

    .pm-node-wrap{
        min-height:138px;
        padding-left:90px;
    }

    .pm-node{
        left:38px;
        top:22px;
        width:76px;
        height:76px;
        border-radius:25px;
    }

    .pm-node,
    .pm-node:hover{
        transform:translateX(-50%) rotate(45deg);
    }

    .pm-node::after{
        font-size:1.55rem;
    }

    .pm-node-label,
    .pm-node-label.left,
    .pm-node-label.right{
        position:relative;
        top:0;
        left:auto;
        right:auto;
        width:100%;
        min-height:0;
        text-align:left;
        padding:18px 20px;
        transform:none;
    }

    .pm-node-label:hover{
        transform:none;
    }

    .pm-node-label:before,
    .pm-node-label.left:before,
    .pm-node-label.right:before{
        left:-8px;
        right:auto;
        transform:rotate(45deg);
    }

    .pm-node-label h3{
        font-size:1.08rem;
    }

    .pm-node-label small,
    .pm-node-label p{
        font-size:.92rem;
    }
}

@media(max-width:480px){
    .pm-stat-grid{
        grid-template-columns:1fr 1fr;
    }

    .pm-world-tab{
        padding:10px 13px;
        font-size:.9rem;
    }

    .pm-node-wrap{
        padding-left:76px;
    }

    .pm-map:before{
        left:34px;
        width:15px;
        background:linear-gradient(180deg,#2563eb 0%, #06b6d4 45%, #22c55e 100%);
        box-shadow:
            inset 0 0 0 2px rgba(255,255,255,.22),
            0 0 0 5px rgba(37,99,235,.12),
            0 10px 22px rgba(37,99,235,.25);
    }

    .pm-node{
        left:34px;
        width:66px;
        height:66px;
        border-radius:22px;
        border-width:6px;
    }

    .pm-node::after{
        font-size:1.35rem;
    }
}

.pm-symbol-question{
    display:flex;
    justify-content:center;
    align-items:center;
    margin:20px auto;
    padding:20px;
    background:#fff;
    border-radius:22px;
    border:2px solid rgba(37,99,235,.15);
    box-shadow:0 12px 30px rgba(15,23,42,.10);
    max-width:320px;
}

.pm-symbol-question img{
    max-width:220px;
    max-height:180px;
    object-fit:contain;
}

.pm-hero{
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:24px;
}

.pm-hero-title-wrap{
    display:flex;
    align-items:center;
    gap:22px;
}

.pm-hero-logo{
    width:110px;
    height:110px;
    object-fit:contain;
    border-radius:24px;
    background:rgba(255,255,255,0.08);
    padding:10px;
    box-shadow:0 10px 30px rgba(0,0,0,0.25);
    flex-shrink:0;
    transition:transform .25s ease;
}

.pm-hero-logo:hover{
    transform:scale(1.05);
}

.pm-question-counter {
    margin-bottom: 18px;
    padding: 14px 16px;
    border-radius: 18px;
    background: linear-gradient(135deg, #eef6ff, #f8fbff);
    border: 1px solid rgba(59, 130, 246, 0.18);
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.08);
    font-weight: 800;
    color: #1e3a8a;
}

.pm-question-counter span {
    display: block;
    margin-bottom: 10px;
}

.pm-question-progress {
    height: 9px;
    background: #dbeafe;
    border-radius: 999px;
    overflow: hidden;
}

.pm-question-progress i {
    display: block;
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #2563eb, #22c55e);
}

.pm-world-tab.completed {
    background: linear-gradient(135deg, #16a34a, #22c55e);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.18);
    box-shadow:
        0 10px 24px rgba(34,197,94,0.30),
        inset 0 1px 0 rgba(255,255,255,0.25);
}

.pm-world-tab.completed:hover {
    transform: translateY(-2px);
    box-shadow:
        0 14px 30px rgba(34,197,94,0.38),
        inset 0 1px 0 rgba(255,255,255,0.25);
}

.pm-world-tab.completed.active {
    background: linear-gradient(135deg, #15803d, #16a34a);
}

/* Correction texte loader dans les cartes losanges */
.pm-node .pm-loading-wrap{
    position:relative;
    z-index:5;
    width:82px;
    height:82px;
    transform:rotate(-45deg);
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    gap:4px;
    text-align:center;
    line-height:1.05;
}

.pm-node .pm-loader-text{
    font-size:.68rem;
    font-weight:1000;
    color:#fff;
    max-width:74px;
    white-space:normal;
    text-align:center;
}

.pm-node .pm-loader{
    width:18px;
    height:18px;
    flex-shrink:0;
}

/* Cache l’icône automatique ⚡ / 🏆 pendant le chargement */
.pm-node:has(.pm-loading-wrap)::after{
    content:none !important;
}

.pm-level-complete{
    text-align:center;
    padding:20px 10px 10px;
}

.pm-level-complete-icon{
    font-size:5rem;
    margin-bottom:12px;
    animation:pmVictoryBounce 1s ease infinite alternate;
}

.pm-level-complete h2{
    margin:0;
    font-size:2rem;
    font-weight:1000;
    color:#16a34a;
}

.pm-level-complete p{
    margin:14px 0 22px;
    font-size:1.1rem;
    font-weight:800;
    color:#475569;
}

.pm-level-stats{
    display:flex;
    justify-content:center;
    gap:14px;
    flex-wrap:wrap;
    margin-bottom:24px;
}

.pm-level-stats div{
    background:#f8fafc;
    border:1px solid #dbeafe;
    border-radius:18px;
    padding:12px 16px;
    font-weight:900;
    color:#1e3a8a;
    box-shadow:0 10px 24px rgba(15,23,42,.06);
}

.pm-finish-btn{
    font-size:1rem;
    padding:14px 22px;
}

@keyframes pmVictoryBounce{
    from{
        transform:translateY(0) scale(1);
    }
    to{
        transform:translateY(-8px) scale(1.06);
    }
}

.pm-leaderboard-link {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 14px;
    padding: 13px 16px;
    border-radius: 18px;
    background: linear-gradient(135deg, #facc15, #f97316);
    color: #111827 !important;
    font-weight: 900;
    text-decoration: none !important;
    box-shadow: 0 10px 24px rgba(249, 115, 22, .28);
}

.pm-leaderboard-link:hover {
    transform: translateY(-2px);
}

.pm-avatar {
    overflow: hidden;
}

.pm-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: inherit;
    display: block;
}

/* ========================= */
/* CARTE DÉFI + BOUTONS */
/* ========================= */

.pm-reward-card {
    position: relative;
    overflow: hidden;
    margin-top: 22px;
    padding: 26px 28px;
    border-radius: 30px;
    background:
        radial-gradient(circle at 15% 10%, rgba(59,130,246,.30), transparent 35%),
        radial-gradient(circle at 85% 90%, rgba(244,63,94,.28), transparent 38%),
        linear-gradient(135deg, #111827, #1e293b);
    color: #fff;
    box-shadow: 0 22px 50px rgba(15, 23, 42, .28);
}

.pm-reward-card::before {
    content: "";
    position: absolute;
    inset: -80px;
    background: linear-gradient(120deg, transparent, rgba(255,255,255,.14), transparent);
    transform: rotate(12deg) translateX(-80%);
    animation: pmRewardShine 5s ease-in-out infinite;
}

.pm-reward-content {
    position: relative;
    z-index: 2;
    text-align: center;
}

.pm-reward-content h3 {
    margin: 0 0 10px;
    font-size: 1.55rem;
    font-weight: 1000;
}

.pm-reward-content p {
    margin: 0 0 18px;
    color: rgba(255,255,255,.84);
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.45;
}

/* Boutons identiques */
.pm-ranking-btn,
.reward-life-btn,
.pm-admin-apk-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;

    width: 100%;
    min-height: 76px;

    margin-top: 16px;
    padding: 18px 22px;

    border: none;
    border-radius: 999px;

    color: #fff !important;
    text-decoration: none !important;

    font-size: 1.18rem;
    font-weight: 1000;
    line-height: 1.15;
    text-align: center;

    cursor: pointer;

    transition:
        transform .18s ease,
        box-shadow .18s ease,
        filter .18s ease;
}

/* Couleurs */
.pm-ranking-btn {
    background: linear-gradient(135deg, #facc15, #f97316);
    box-shadow: 0 14px 30px rgba(249, 115, 22, .34);
}

.reward-life-btn {
    background: linear-gradient(135deg, #ff4d6d, #e11d48);
    box-shadow: 0 14px 30px rgba(225, 29, 72, .34);
}

.pm-admin-apk-btn {
    background: linear-gradient(135deg, #10b981, #059669);
    box-shadow: 0 14px 30px rgba(16, 185, 129, .34);
}

/* Effets */
.pm-ranking-btn:hover,
.reward-life-btn:hover,
.pm-admin-apk-btn:hover {
    transform: translateY(-3px);
    filter: brightness(1.05);
}

.pm-ranking-btn:active,
.reward-life-btn:active,
.pm-admin-apk-btn:active {
    transform: scale(.98);
}

/* Mobile */
@media (max-width: 576px) {
    .pm-reward-card {
        padding: 22px;
        border-radius: 26px;
    }

    .pm-ranking-btn,
    .reward-life-btn,
    .pm-admin-apk-btn {
        min-height: 68px;
        font-size: 1.05rem;
        padding: 16px 18px;
    }
}

@keyframes pmRewardShine {
    0%, 60% {
        transform: rotate(12deg) translateX(-80%);
    }
    100% {
        transform: rotate(12deg) translateX(80%);
    }
}

/* ========================= */
/* HERO AVENTURE MELEC */
/* ========================= */

.pm-hero-app {
    position: relative;
    overflow: hidden;

    display: flex;
    align-items: center;
    gap: 22px;

    margin-bottom: 32px;
    padding: 24px 30px;

    border-radius: 30px;

    background:
        radial-gradient(circle at 85% 10%, rgba(59,130,246,.18), transparent 32%),
        linear-gradient(135deg, #ffffff, #edf5ff);

    box-shadow: 0 16px 40px rgba(15,23,42,.08);
}

.pm-hero-logo-wrap {
    flex: 0 0 auto;

    width: 112px;
    height: 112px;

    padding: 10px;

    border-radius: 26px;
    background: rgba(255,255,255,.82);

    box-shadow: 0 12px 28px rgba(15,23,42,.14);

    animation: heroFloat 4s ease-in-out infinite;
}

.pm-hero-logo {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 20px;
}

.pm-hero-content {
    flex: 1;
    min-width: 0;
}

.pm-hero-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    margin-bottom: 8px;
    padding: 7px 13px;

    border-radius: 999px;

    background: linear-gradient(135deg, #dbeafe, #e0e7ff);
    color: #1d4ed8;

    font-size: .8rem;
    font-weight: 950;
}

.pm-hero-content h1 {
    margin: 0 0 6px;

    font-size: clamp(1.65rem, 3vw, 2.45rem);
    line-height: 1.08;

    font-weight: 950;
    letter-spacing: -.04em;

    color: #0f172a;
}

.pm-hero-content p {
    margin: 0;

    max-width: 760px;

    font-size: 1rem;
    line-height: 1.45;

    font-weight: 750;

    color: #475569;
}

.pm-hero-mini {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;

    margin-top: 14px;
}

.pm-hero-mini span {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 7px 12px;

    border-radius: 999px;

    background: rgba(255,255,255,.75);

    font-size: .82rem;
    font-weight: 900;

    color: #1e293b;
}

@keyframes heroFloat {
    0%,100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-4px);
    }
}

@media (max-width: 768px) {
    .pm-hero-app {
        flex-direction: column;
        text-align: center;

        padding: 22px 18px;
    }

    .pm-hero-logo-wrap {
        width: 92px;
        height: 92px;
    }

    .pm-hero-content h1 {
        font-size: 1.65rem;
    }

    .pm-hero-mini {
        justify-content: center;
    }
}

/* =========================================================
   CORRECTION ROUTE PARCOURS - VERSION VISIBLE
   À coller tout en bas du fichier CSS
========================================================= */

.pm-map {
    position: relative !important;
    isolation: auto !important;
}

/* On supprime toute route secondaire blanche éventuelle */
.pm-map::after {
    content: none !important;
    display: none !important;
}

/* Route principale bien visible */
.pm-map::before {
    content: "" !important;
    position: absolute !important;
    left: 50% !important;
    top: 70px !important;
    bottom: 70px !important;

    width: 18px !important;
    border-radius: 999px !important;

    background: linear-gradient(
        180deg,
        #1d4ed8 0%,
        #0284c7 35%,
        #0ea5e9 60%,
        #22c55e 100%
    ) !important;

    box-shadow:
        0 0 0 5px rgba(255,255,255,.75),
        0 0 24px rgba(37,99,235,.45),
        0 12px 28px rgba(15,23,42,.18) !important;

    transform: translateX(-50%) !important;
    z-index: 0 !important;
}

/* Les niveaux restent au-dessus */
.pm-node-wrap {
    position: relative !important;
    z-index: 2 !important;
}

/* Les losanges restent au-dessus de la route */
.pm-node {
    z-index: 4 !important;
}

/* Les cartes texte aussi */
.pm-node-label {
    z-index: 5 !important;
}

/* MOBILE */
@media (max-width: 760px) {
    .pm-map::before {
        left: 38px !important;
        top: 58px !important;
        bottom: 58px !important;
        width: 16px !important;
    }
}

/* PETIT MOBILE */
@media (max-width: 480px) {
    .pm-map::before {
        left: 34px !important;
        width: 15px !important;
    }
}

/* =========================================================
   ROUTE PARCOURS PAR SEGMENTS - PAS DE MORCEAUX MANQUANTS
========================================================= */

/* On coupe l'ancienne route globale */
.pm-map::before,
.pm-map::after {
    content: none !important;
    display: none !important;
}

/* Carte propre */
.pm-map {
    position: relative !important;
    max-width: 760px !important;
    margin: 0 auto !important;
    overflow: visible !important;
}

/* Chaque niveau devient un segment de parcours */
.pm-node-wrap {
    position: relative !important;
    z-index: 2 !important;
    min-height: 190px !important;
}

/* Route entre les niveaux */
.pm-node-wrap::before {
    content: "" !important;
    position: absolute !important;

    left: 50% !important;
    top: 92px !important;
    height: 168px !important;
    width: 90px !important;

    transform: translateX(-50%) !important;

    background:
        url("data:image/svg+xml,%3Csvg width='90' height='180' viewBox='0 0 90 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M45 0 C10 45 80 85 45 180' fill='none' stroke='%231d4ed8' stroke-width='14' stroke-linecap='round' opacity='.72'/%3E%3Cpath d='M45 0 C10 45 80 85 45 180' fill='none' stroke='%2306b6d4' stroke-width='8' stroke-linecap='round' opacity='.95'/%3E%3Cpath d='M45 0 C10 45 80 85 45 180' fill='none' stroke='%2386efac' stroke-width='3' stroke-linecap='round' stroke-dasharray='14 18' opacity='.9'/%3E%3C/svg%3E")
        center top / 90px 180px no-repeat !important;

    z-index: 0 !important;
    pointer-events: none !important;
}

/* On inverse le sens une fois sur deux pour faire une route en S */
.pm-node-wrap:nth-child(even)::before {
    transform: translateX(-50%) scaleX(-1) !important;
}

/* Pas de route après le dernier niveau */
.pm-node-wrap:last-child::before {
    content: none !important;
    display: none !important;
}

/* Losanges légèrement décalés, sans débordement */
.pm-node-wrap:nth-child(odd) .pm-node {
    left: 47% !important;
}

.pm-node-wrap:nth-child(even) .pm-node {
    left: 53% !important;
}

/* Les losanges passent au-dessus de la route */
.pm-node {
    z-index: 10 !important;
}

/* Les cartes restent propres */
.pm-node-label {
    z-index: 12 !important;
    width: 260px !important;
    max-width: 260px !important;
}

.pm-node-label.left {
    right: calc(50% + 85px) !important;
}

.pm-node-label.right {
    left: calc(50% + 85px) !important;
}

/* Mobile : route droite et lisible */
@media (max-width: 760px) {
    .pm-map {
        max-width: 100% !important;
    }

    .pm-node-wrap {
        min-height: 138px !important;
    }

    .pm-node-wrap::before {
        left: 38px !important;
        top: 78px !important;
        height: 110px !important;
        width: 16px !important;

        transform: translateX(-50%) !important;

        border-radius: 999px !important;

        background: linear-gradient(
            180deg,
            #1d4ed8 0%,
            #0284c7 35%,
            #0ea5e9 60%,
            #22c55e 100%
        ) !important;

        box-shadow:
            0 0 0 5px rgba(255,255,255,.75),
            0 0 20px rgba(37,99,235,.35) !important;
    }

    .pm-node-wrap:nth-child(even)::before {
        transform: translateX(-50%) !important;
    }

    .pm-node-wrap:nth-child(n) .pm-node {
        left: 38px !important;
    }

    .pm-node-label,
    .pm-node-label.left,
    .pm-node-label.right {
        width: 100% !important;
        max-width: none !important;
        left: auto !important;
        right: auto !important;
    }
}

@media (max-width: 480px) {
    .pm-node-wrap::before {
        left: 34px !important;
        width: 15px !important;
    }

    .pm-node-wrap:nth-child(n) .pm-node {
        left: 34px !important;
    }
}