:root {
    --primary-color: #f74f40;
    --secondary-color: #f74f40;
    --background-color: #242424;
    --text-color: #ffffff;
}

body {
    margin: 0;
    font-family: system-ui, -apple-system, sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    font-size: 16px;
}

.mapboxgl-ctrl-group {
    border-radius: 0 !important;
}

#app {
    display: flex;
    flex-direction: column;
    height: 100vh;
}

#home {
    background-image: url('images/Background.jpg');
    display: flex;
    flex-direction: column;
    color: #242424;
}

.home__header {
    padding: .5rem 1em;
    z-index: 1000;
}

.home__logo {
    width: 5rem;
    height: auto;
}

.home__main {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    flex: 1;
    margin-bottom: 2em;
}

.home__intro {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin: 1em 0;
}

.home__efix_logo {
    width: 5em;
    margin-bottom: 1em;
}

h1.home__title {
    margin: 0;
    font-size: 1.5em;
    text-align: center;
    text-transform: uppercase;
    line-height: 1em;
    color: #f74f40;
}

.custom__border_title {
    width: 6em;
    height: .3em;
    background-color: #f74f40;
    margin-top: .3em;
}

.home__icons {
    display: flex;
    width: 100%;
    margin-bottom: 2em;
    align-items: baseline;
    justify-content: center;
}

.home__icons img {
    width: 90px;
}

.home__icons span{
    text-transform: uppercase;
    font-size: .8em;
}

.home__icon  {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin: 0 .5em;
    flex-basis: 26%;
}

.custom__border {
    width: 3em;
    height: .3em;
    background-color: #242424;
}

.home__btn {
    text-transform: uppercase;
    background-color: #242424;
    color: #fff;
    padding: 1em;
}

footer {
    text-align: right;
    width: 100%;
    display: flex;
    flex-direction: row;
    justify-content: end;
}

footer img {
    width: 5em;
    padding: 0 1rem 1rem 0;
}

.map__header {
    position: absolute;
    width: 100%;
    z-index: 1;
    height: 80px;
}

.map__logo {
    width: 4rem;
    height: auto;
    position: absolute;
    top: 5em;
    left: .5em;
    z-index: 1;
}

.progress-bar {
    display: flex;
    padding: .3em;
    width: 86%;
    border-radius: 0;
    background: #fff;
    margin: 1em .5em;
    align-items: center;
}

.progress {
    height: 40px;
    background: var(--primary-color);
    border-radius: 0;
    width: 0%;
    transition: width 0.3s ease;
    max-width: 75%;
    margin-right: .5em;
}

#progress-nb {
    position: absolute;
    margin-left: 10px;
    font-size: 2em;
    color: #f0f0f0;
}

#progress-text {
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 1.3em;
    color: #242424;
    position: fixed;
    right: 35px;
    width: 25%;
    top: 22px;
}

.map__nb_streetart {
    font-size: 1.5em;
}

.map__text_streetart {
    font-size: .6em;
    text-transform: uppercase;
}

.map__btn_actions {
    display: flex;
    position: fixed;
    bottom: 0;
    right: 0;
    width: 100%;
    justify-content: space-around;
    margin-bottom: 2.5em;
}

main {
    flex: 1;
    position: relative;
}

#map {
    height: 100%;
    width: 100%;
}

.action-button {
    padding: .5em 1rem;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 0;
    font-size: .8rem;
    text-transform: uppercase;
    cursor: pointer;
    z-index: 1000;
    transition: background-color 0.3s ease;
}

.action-button:hover {
    background-color: var(--secondary-color);
}

#next-artwork {
    bottom: 6rem;
}

#scanner-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: black;
    z-index: 2000;
}

#interactive.viewport {
    width: 100%;
    height: 100%;
    position: relative;
}

#scanner-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

#qr-viewfinder {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 250px;
    height: 250px;
    border: 2px solid var(--primary-color);
    border-radius: 0;
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.5);
}

#qr-viewfinder::before {
    content: '';
    position: absolute;
    width: 40px;
    height: 40px;
    border-top: 4px solid var(--primary-color);
    border-left: 4px solid var(--primary-color);
    top: -2px;
    left: -2px;
}

#qr-viewfinder::after {
    content: '';
    position: absolute;
    width: 40px;
    height: 40px;
    border-bottom: 4px solid var(--primary-color);
    border-right: 4px solid var(--primary-color);
    bottom: -2px;
    right: -2px;
}

#scan-help-text {
    position: absolute;
    bottom: 20%;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    text-align: center;
    font-size: 1.2rem;
    background: rgba(0, 0, 0, 0.7);
    padding: 1rem;
    border-radius: 0;
    z-index: 2001;
}

.popup, .mapboxgl-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 3000;
}

.popup-content {
    background: #f74f40;
    max-width: 80%;
    width: 600px;
    position: relative;
    overflow: hidden;
    padding-top: 1em;
}

.mapboxgl-popup {
    transform: none !important;
    background: rgba(0, 0, 0, 0.4) !important;
}

.mapboxgl-popup .popup-image-container {
    display: contents;
}

.mapboxgl-popup .popup-text-content {
    justify-content: center;
}

.popup-image-container {
    height: 300px;
    overflow: hidden;
    padding: 1em;
    background: #fff;
}

#artwork-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.popup-message-challenge {
    display: flex;
    padding: 1em;
    align-items: center;
}

.popup-message-challenge img {
    height: 80px;
}

.popup-message-challenge p {
    display: flex;
    flex-flow: column;
    text-transform: uppercase;
    margin-left: 5px;
    color: #f0f0f0;
}

.popup-message-title {
    font-size: 2.5em;
    line-height: 1em;
}

.popup-message-text {
    font-size: .7em;
}

.popup-message-hr {
    height: 5px;
    width: 50px;
    background: #ddd;
    margin-top: 2px;
}

.popup-text-content {
    padding: 1rem;
    background: #000;
    display: flex;
    color: #f0f0f0;
    text-transform: uppercase;
    align-items: center;
}

#artwork-description {
    font-size: .7rem;
    line-height: 1em;
    margin: 0 .5em;
}

.popup-text-content img {
    height: 30px;
}

.popup-message-infos {
    background-color: #000;
    color: #f0f0f0;
    padding: 1em;
}

.popup-message-infos h2 {
    font-size: 2em;
}

.text-content-infos {
    background-color: #fff;
    color: #000;
    padding: 1.5em 1em;
}

.text-content-infos p {
    margin-bottom: 1em;
}

.text-content-infos ul {
    list-style: auto;
    margin-left: 15px;
}

.text-content-infos i {
    font-size: 1.5em;
}

.popup__content_victory {
    display: flex;
    flex-flow: column;
    color: #f0f0f0;
    text-transform: uppercase;
    align-items: center;
    margin-bottom: 1em;
}

.popup__content_victory img {
    width: 50%;
}

.popup__content_victory h2 {
    font-size: 2.5em;
    line-height: 1em;
}

.popup__content_victory span {
    font-size: .7em;
}

.popup__content_victory_rdv {
    background: #fff;
    color: #000;
    text-transform: uppercase;
    font-size: .9em;
    text-align: center;
    line-height: 1.1em;
    padding: .5em .5em;
}

.popup__content_victory_logo {
    display: flex;
    justify-content: center;
    padding: .3em 0;
    background: #000;
}

.popup__content_victory_logo img {
    width: 15%;
}


.hidden {
    display: none !important;
}

#close-scanner {
    position: absolute;
    top: 1rem;
    right: 1rem;
    padding: 0.5rem 1rem;
    background: white;
    border: none;
    border-radius: 0;
    cursor: pointer;
    z-index: 3001;
}

#close-popup {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 32px;
    height: 32px;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 3001;
}

#close-popup::before,
#close-popup::after {
    content: '';
    position: absolute;
    width: 24px;
    height: 2px;
    background-color: white;
    top: 50%;
    left: 50%;
}

#close-popup::before {
    transform: translate(-50%, -50%) rotate(45deg);
}

#close-popup::after {
    transform: translate(-50%, -50%) rotate(-45deg);
}

/* Styles pour la carte */
.custom-marker {
    position: relative;
}

.marker-pin {
    width: 30px;
    height: 42px;
    background: var(--primary-color);
    border-top-left-radius: 100%;
    border-top-right-radius: 100%;
    border-bottom-right-radius: 100%;
    position: absolute;
    transform: rotate(-45deg);
    left: 50%;
    top: 50%;
    margin: -20px 0 0 -20px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.marker-pin-fix {
    width: 30px;
    height: 42px;
    background: #03a01d;
    border-top-left-radius: 100%;
    border-top-right-radius: 100%;
    border-bottom-right-radius: 100%;
    position: absolute;
    transform: rotate(-45deg);
    left: 50%;
    top: 50%;
    margin: -20px 0 0 -20px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.marker-pin-fix::after {
    content: '';
    width: 20px;
    height: 20px;
    background: white;
    position: absolute;
    border-radius: 100%;
    top: 50%;
    left: 50%;
    margin: -10px 0 0 -10px;
}

.marker-pin::after {
    content: '';
    width: 20px;
    height: 20px;
    background: white;
    position: absolute;
    border-radius: 100%;
    top: 50%;
    left: 50%;
    margin: -10px 0 0 -10px;
}

.custom-popup {
    padding: 10px;
    text-align: center;
}

.custom-popup h3 {
    margin: 0 0 5px 0;
    color: #333;
    font-size: 1.2em;
}

.custom-popup .artist {
    color: #666;
    font-style: italic;
    margin: 0;
}

/* Styles pour l'itinéraire */
.route-info {
    position: absolute;
    top: 20px;
    right: 20px;
    background: var(--background-color);
    border-radius: 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    max-width: 300px;
    max-height: 80vh;
    overflow-y: auto;
    color: var(--text-color);
    z-index: 1000;
}

.route-info-content {
    padding: 15px;
}

.route-summary {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 10px;
    margin-bottom: 10px;
    position: relative;
}

.route-summary h3 {
    margin: 0;
    font-size: 1.1em;
    padding-right: 30px;
}

.route-close-button {
    position: absolute;
    top: 0;
    right: 0;
    width: 24px;
    height: 24px;
    border: none;
    background: transparent;
    cursor: pointer;
    padding: 0;
}

.route-close-button::before,
.route-close-button::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 2px;
    background-color: var(--text-color);
    top: 50%;
    left: 50%;
}

.route-close-button::before {
    transform: translate(-50%, -50%) rotate(45deg);
}

.route-close-button::after {
    transform: translate(-50%, -50%) rotate(-45deg);
}

.route-steps {
    font-size: 0.9em;
}

.route-step {
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.route-step:last-child {
    border-bottom: none;
}

.step-number {
    color: var(--primary-color);
    min-width: 20px;
}

.step-instruction {
    flex: 1;
}

.step-distance {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9em;
    white-space: nowrap;
}

.show-route-details {
    position: absolute;
    top: 20px;
    right: 20px;
    padding: 0.75rem 1.5rem;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 0;
    font-size: 1rem;
    cursor: pointer;
    z-index: 1000;
    transition: background-color 0.3s ease;
}

.show-route-details:hover {
    background-color: var(--secondary-color);
}
