/* ==========================================================
   Hop Courses Map
   style.css
   Sprint 2.5.1
   Partie 1 / 3
========================================================== */

/* ==========================================================
   VARIABLES
========================================================== */

:root{

    --blue:#003366;
    --orange:#F28C18;

    --background:#F5F7FA;

    --white:#FFFFFF;

    --text:#243447;

    --text-light:#8A94A6;

    --shadow:0 12px 32px rgba(0,0,0,.15);

    --radius:24px;

}

/* ==========================================================
   RESET
========================================================== */

*{

    margin:0;

    padding:0;

    box-sizing:border-box;

}

html,
body{

    width:100%;

    height:100%;

    overflow:hidden;

    background:var(--background);

    font-family:
        Inter,
        "SF Pro Display",
        Roboto,
        sans-serif;

    color:var(--text);

}

/* ==========================================================
   CARTE
========================================================== */

#map{

    position:fixed;

    inset:0;

    width:100%;

    height:100%;

    z-index:1;

}

/* ==========================================================
   BOTTOM SHEET
========================================================== */

.bottom-sheet{

    position:absolute;

    left:50%;

    bottom:10px;

    transform:translateX(-50%);

    width:94%;

    max-width:430px;

    z-index:999;

}

.sheet-content{

    background:var(--white);

    border-radius:24px;

    box-shadow:var(--shadow);

    padding:18px 20px 18px;

    overflow:hidden;

}

/* ==========================================================
   CARTE COURSE
========================================================== */

.course-card{

    display:flex;

    flex-direction:column;

}

/* ==========================================================
   COMPTEUR
========================================================== */

.course-counter{

    text-align:center;

    font-size:15px;

    font-weight:600;

    color:var(--text-light);

    margin-bottom:10px;

}
/* ==========================================================
   ENTÊTE
========================================================== */

.course-header{

    display:flex;

    justify-content:space-between;

    align-items:flex-end;

    margin-bottom:18px;

}

.course-date{

    font-size:18px;

    font-weight:700;

    color:var(--blue);

    line-height:1.2;

}

.course-price{

    font-size:30px;

    font-weight:800;

    color:var(--orange);

    line-height:1;

    white-space:nowrap;

}

/* ==========================================================
   LIGNES D'INFORMATIONS
========================================================== */

.course-row{

    display:flex;

    align-items:center;

    gap:14px;

    min-height:30px;

    margin-bottom:12px;

}

.course-row:last-child{

    margin-bottom:0;

}

/* ==========================================================
   ICÔNES
========================================================== */

.course-icon{

    width:24px;

    min-width:24px;

    display:flex;

    justify-content:center;

    align-items:center;

    font-size:18px;

}

/* ==========================================================
   TEXTE
========================================================== */

.course-text{

    flex:1;

    font-size:16px;

    font-weight:500;

    color:var(--text);

    line-height:1.35;

}

/* ==========================================================
   PASTILLES
========================================================== */

.dot{

    width:14px;

    height:14px;

    min-width:14px;

    border-radius:50%;

    margin-left:5px;

}

.dot.collect{

    background:var(--blue);

}

.dot.delivery{

    background:var(--orange);

}
/* ==========================================================
   HOVER
========================================================== */

.course-card{

    cursor:pointer;

    transition:
        transform .20s ease,
        box-shadow .20s ease;

}

.course-card:active{

    transform:scale(.985);

}
/* ==========================================================
   LEAFLET
========================================================== */

.leaflet-container{

    background:#EEF2F5;

}

.leaflet-control-zoom{

    border:none !important;

    border-radius:16px !important;

    overflow:hidden;

    box-shadow:0 8px 18px rgba(0,0,0,.18);

}

.leaflet-control-zoom a{

    width:40px !important;

    height:40px !important;

    line-height:40px !important;

    font-size:20px !important;

}

/* ==========================================================
   POPUPS
========================================================== */

.leaflet-popup-content{

    font-size:13px;

    font-weight:600;

}

.leaflet-popup-tip-container{

    display:none;

}

/* ==========================================================
   LOADING
========================================================== */

.loading{

    padding:35px 15px;

    text-align:center;

    color:#7A8599;

    font-size:15px;

}

/* ==========================================================
   MOBILE
========================================================== */

@media(max-width:430px){

    .bottom-sheet{

        width:95%;

        bottom:8px;

    }

    .sheet-content{

        padding:18px;

    }

    .course-date{

        font-size:17px;

    }

    .course-price{

        font-size:28px;

    }

    .course-text{

        font-size:15px;

    }

}

@media(max-width:360px){

    .bottom-sheet{

        width:97%;

    }

    .sheet-content{

        padding:16px;

    }

    .course-date{

        font: size 20px;

    }

    .course-price{

        font-size:20px;

    }

    .course-text{

        font-size:14px;

    }

}

/* ==========================================================
   ANIMATIONS
========================================================== */

.course-card{

    animation:fadeCard .22s ease;

}

@keyframes fadeCard{

    from{

        opacity:0;

        transform:translateY(8px);

    }

    to{

        opacity:1;

        transform:translateY(0);

    }

}

/* ==========================================================
   BOTTOM SHEET
   Préparation Sprint 2.6
========================================================== */

.sheet-slide-left{

    animation:slideLeft .28s ease both;

}

.sheet-slide-right{

    animation:slideRight .28s ease both;

}

@keyframes slideLeft{

    from{

        opacity:0;

        transform:translateX(24px);

    }

    to{

        opacity:1;

        transform:translateX(0);

    }

}

@keyframes slideRight{

    from{

        opacity:0;

        transform:translateX(-24px);

    }

    to{

        opacity:1;

        transform:translateX(0);

    }

}
/* ==========================================================
   Sprint 2.6.3
   Animations améliorées
========================================================== */

.sheet-exit-left{

    animation:sheetExitLeft .28s cubic-bezier(.22,.61,.36,1) forwards;

}

.sheet-exit-right{

    animation:sheetExitRight .28s cubic-bezier(.22,.61,.36,1) forwards;

}

.sheet-enter{

    animation:sheetEnter .30s cubic-bezier(.22,.61,.36,1);

}

@keyframes sheetExitLeft{

    from{

        opacity:1;

        transform:translateX(0) scale(1);

    }

    to{

        opacity:0;

        transform:translateX(-160px) scale(.96);

    }

}

@keyframes sheetExitRight{

    from{

        opacity:1;

        transform:translateX(0) scale(1);

    }

    to{

        opacity:0;

        transform:translateX(160px) scale(.96);

    }

}

@keyframes sheetEnter{

    from{

        opacity:0;

        transform:translateX(90px) scale(.96);

    }

    to{

        opacity:1;

        transform:translateX(0) scale(1);

    }

}