/* ==========================================================
   TRAIL
   ========================================================== */





/* ===========================
   PC
=========================== */

#btnPieve{
    left:-240px;
    top:100px;
}

#btnFalcunaghja{
    left:-90px;
    top:100px;
}

#btnParteu{
    left:60px;
    top:100px;
}

/* ===========================
   MOBILE
=========================== */
@media (max-width:768px){

  .trailTopBtn{
    position:absolute !important;
    top:114px !important;

    width:27% !important;
    min-width:0 !important;

    box-sizing:border-box;
    padding:5px 2px;

    font-size:10px;
    line-height:1.1;

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

    text-align:center;
}

    .trailTopBtn div:first-child{
        font-size:10px;
        font-weight:bold;
    }

    .trailTopBtn div:last-child{
        font-size:8px !important;
    }

    #btnPieve{
        left:15% !important;
    }

    #btnFalcunaghja{
        left:43% !important;
    }

    #btnParteu{
        left:71% !important;
    }

}



#headerTitle{

    display:flex;
    align-items:center;
    justify-content:center;
    gap:20px;
    flex-wrap:nowrap;

}

#trailTitle{

    position:relative;
    left:-120px;      /* ← vers la gauche (+ vers la droite) */

    white-space:nowrap;
    font-size:20px;
    font-weight:700;

}

#trailDate{

    margin-left:auto;

    margin-right:-620px;

    white-space:nowrap;

    font-size:15px;

}

@media (max-width:768px){

    #headerTitle{

        display:flex;
        flex-direction:column;
        align-items:center;
        justify-content:center;
        gap:4px;

    }

    #trailTitle{

        position:static;
        left:auto;
        transform:none;
        margin:0;
        width:100%;
        text-align:center;
        font-size:20px;

    }

    #trailDate{

        position:static;
        margin:4px 0 0 0;
        width:100%;
        text-align:center;
        font-size:15px;

    }

}





.trailMiniBtn{
    position:absolute;
    width:32px;
    height:32px;
    padding:0;
    background:none;
    border:none;
    color:black;
    font-size:22px;   /* taille de l'icône */
    cursor:pointer;
    z-index:10000;
    display:flex;
    align-items:center;
    justify-content:center;
}


/* PC */
#btnPieveDownload   { left:70px; }
#btnPieveProfile    { left:150px; }



@media (max-width:768px){

    /* A Pieve */
    #btnPieveDownload{
        left:70px !important;
        top:53px !important;
    }

    #btnPieveProfile{
        left:115px !important;
        top:53px !important;
    }

    /* A Falcunaghja */
    #btnFalcunaghjaDownload{
        left:170px !important;
        top:53px !important;
    }

    #btnFalcunaghjaProfile{
        left:220px !important;
        top:53px !important;
    }

    /* A Teppa */
    #btnParteuDownload{
        left:270px !important;
        top:53px !important;
    }

    #btnParteuProfile{
        left:320px !important;
        top:53px !important;
    }

}
/* ============================================================
   MENU TRAIL
   ============================================================ */

.trailSection {
    margin-top: 15px;
    padding-top: 12px;
    border-top: 1px solid rgba(255,255,255,.25);
}

.trailTitle {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #27ae60;
    font-size: 17px;
    font-weight: bold;
    margin-bottom: 10px;
}

.trailBtn {
    display: block;
    width: 100%;
    margin: 6px 0;
    padding: 10px 14px;
    background: #2d3748;
    color: white;
    border: none;
    border-radius: 8px;
    text-align: left;
    font-size: 14px;
    cursor: pointer;
    transition: .2s;
}

.trailBtn:hover {
    background: #27ae60;
}
#trailCancelBtn {
    display: none !important;
}
body.android #btnPieve{
    width:90px !important;
    left:58px !important;
}

body.android #btnFalcunaghja{
    width:90px !important;
    left:156px !important;   /* avant 160px */
}

body.android #btnParteu{
    width:120px !important;
    left:252px !important;   /* avant 252px */
}


.trailInfo{
    display:block;
    margin-top:2px;
    font-size:11px;
    color:rgba(255,255,255,.75);
}


.trailTopBtn{

    position:absolute;
   top:104px;
    width:140px;
    font-size:14px;
    height:50px;
    z-index:10000;
    border:none;
    border-radius:16px;
    color:white;
    font-weight:bold;
    display:flex;
flex-direction:column;
justify-content:center;
align-items:center;
cursor:pointer;

}

.kmCircle{
    width:34px;
    height:34px;
    border-radius:50%;
    background:#e53935;
    border:3px solid white;
    box-shadow:0 2px 6px rgba(0,0,0,.35);

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

    color:white;
    font-size:15px;
    font-weight:bold;
    line-height:1;

    box-sizing:border-box;
}
/* ==========================================================
   🏃 POPUP TRAIL
   ========================================================== */

#trailPopupOverlay{
    position:fixed;
    inset:0;
    z-index:10000000;
    display:flex;
    align-items:center;
    justify-content:center;
    background:rgba(0,0,0,.62);
    padding:14px;
    box-sizing:border-box;
}

.trail-popup-card{
    position:relative;
    width:min(430px,96vw);
    max-height:92vh;
    overflow:auto;
    box-sizing:border-box;
    padding:18px;
    border-radius:22px;
    background:#173d2c;
    color:white;
    box-shadow:0 18px 50px rgba(0,0,0,.4);
}

.trail-title{
    text-align:center;
    font-size:22px;
    font-weight:800;
    margin-bottom:14px;
}

.trail-close{
    position:absolute;
    top:8px;
    right:8px;
    width:34px;
    height:34px;
    padding:0;
    border:0;
    border-radius:50%;
    background:#6b7280;
    color:white;
}

.trail-library{
    display:grid;
    grid-template-columns:repeat(3,1fr);
    gap:8px;
}

.trail-choice{
    min-height:72px;
    padding:7px 4px;
    border:2px solid transparent;
    border-radius:14px;
    background:#285c43;
    color:white;
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
}

.trail-choice span{
    font-size:27px;
    line-height:30px;
}

.trail-choice small{
    font-size:10px;
    margin-top:4px;
}

.trail-choice.selected{
    border-color:white;
    transform:scale(1.03);
    background:#3b7b59;
}

#trailMemo{
    width:100%;
    min-height:85px;
    box-sizing:border-box;
    margin-top:12px;
    padding:10px;
    border:0;
    border-radius:12px;
    font-size:14px;
}

.trail-photo{
    display:block;
    margin-top:10px;
    padding:10px;
    border-radius:12px;
    background:#287a50;
    text-align:center;
    color:white;
}

.trail-photo input{
    display:none;
}

#trailPhotoPreview{
    display:none;
    width:100%;
    max-height:160px;
    object-fit:cover;
    margin-top:10px;
    border-radius:12px;
}

.trail-actions{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:8px;
    margin-top:12px;
}

.trail-actions button{
    height:40px;
    border:0;
    border-radius:12px;
    color:white;
    font-weight:800;
}

.trail-save{
    background:#f59e0b;
}

.trail-cancel{
    background:#6b7280;
}
/* 🔧 POPUP REPERE PLUS PETITE */
#popupPoint .popupBox {
    width: 300px !important;
    max-width: 300px !important;
    max-height: 65vh !important;
    padding: 12px !important;
    border-radius: 18px !important;
}
#btnInfoPratique {
    position: fixed !important;
    right: 15px !important;
    left: auto !important;
    top: 27px !important;
    z-index: 2147483647 !important;
}