html,
body {
    font-size: 24px;
    color: black;
    background-color: #f8f9fa;
    font-family: "Lucida Sans", "Lucida Sans Regular", "Lucida Grande",
        "Lucida Sans Unicode", Geneva, Verdana, sans-serif;
    height: 100%;
    display: flex;
    flex-direction: column;
}

* {
    box-sizing: border-box;
}

a {
    text-decoration: none;
    color: black;
}

div#divSearchCity {
    position: relative;
    display: inline-block;
}

div ul#suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    max-height: 200px;
    overflow-y: auto;
    list-style: none;
    padding: 0;
    margin-left: 0.3rem;
    margin-top: -0.6rem;
    z-index: 9999;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
    font-family: "Arial";
    font-size: 16px;
    width: calc(85%);
    border: 1.2px solid grey;
    border-radius: 5px;
}

div ul#suggestions:empty {
    border: none;
}

input#search,
select#maxTime,
input#coordonnee {
    border-radius: 5px;
    font-size: 0.8rem;
    background-color: white;
    width: 85%;
    border-color: grey;
    padding: 0.12rem;
    margin-left: 0.3rem;
    margin-bottom: 0.6rem;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1); /* petite ombre */
}

select {
    position: static;
    margin: 0;
    padding: 0;
    top: 100%;
}

h2 {
    font-weight: bold;
    margin: 0.5rem 0.2rem;
    font-size: 1.1rem;
}

h1 {
    padding: 4rem 0;
    width: 100%;
    text-align: center;
    background-image: url(images/beau-paysage-de-cascade-crop.jpg);
    background-size: cover;
    /* background-position: center; */
    color: white;
    font-weight: 800;
    font-size: 3rem;
}

.wrapper {
    flex: 1; /* prend tout l’espace restant sous le h1 */
    display: flex;
    justify-content: center; /* centre horizontalement */
    /* align-items: center; */
    /* position: fixed; */
    /* left: 50%; */
    /* top: 19rem; */
    /* transform: translate(-50%, -50%); */
}
div.divContent {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 42rem;
    max-width: 95vw;
    padding: 0.5rem;
}

div.divSearch {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}

div.divResult {
    width: 100%;
    margin-top: 1rem;
}

div.selectLocation {
    display: flex;
    flex-direction: column;
    width: 50%;
}

div.divMaxTime {
    flex: 1;
}

div.divButton {
    width: 100%;
}

button {
    border-radius: 10px;
    border: solid 0.2px rgb(144, 144, 144);
    padding: 0.4rem;
}

div.divButton button {
    display: block;
    width: 100%;
    font-size: 1rem;
    margin-bottom: 0.6rem;

    /* box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3); petite ombre */
}

div button#testBtn {
    background-color: #255991;
    color: white;
    font-weight: bold;
}

div button#export,
div.canyon-extra button {
    background-color: white;
    color: black;
}

footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 0.4rem;
    text-align: center;
    border-top: 1px solid #ddd;
    z-index: 10000;
    font-size: 0.8rem;
    color: gray;
    background-color: #f8f9fa;
    /* TODO: on ne peut pas voir ce que y a en dessous du footer      */
    /* TODO: et faire plutot un footer qu'on voit que en descendant en bas de la page */
}

div.divResult ul li.canyon {
    width: 100%;
    border-radius: 10px;
    border: 0.2px solid #ddd;
    padding: 0.8rem;
    font-size: 1rem;
    background-color: white;
    display: grid;
    /* align-items: center; */
    grid-template-columns: repeat(2, 1fr);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1); /* petite ombre */
    gap: 10px;

    position: relative;
    transition: all 0.3s ease;
}

div.divResult ul li.canyon:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    transform: translateY(-3px);
}

button {
    transition: all 0.3s ease;
}
button:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    transform: translateY(-1px);
}
.fa-map-pin {
    transform: scale(0);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

li.canyon:hover .fa-map-pin {
    transform: scale(1);
    opacity: 1;
}

.full-link {
    position: absolute;
    inset: 0;
    z-index: 1;
}

.time-link {
    position: relative;
    z-index: 2;
}

.time-link:hover {
    color: #255991;
}

.time-link:hover span {
    text-decoration: underline;
}

.bold {
    font-weight: 800;
}

.time {
    font-size: 1rem;
}

.canyon-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* 2 colonnes */
    gap: 15px; /* espace entre les cartes */
    list-style: none; /* enlève les puces */
    padding: 0;
}

li.canyon span.right {
    justify-self: end;
}

#maxTime {
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3); /* petite ombre */
}

.bold {
    font-weight: bold;
}

.time,
.note,
.distance {
    font-size: 0.9em;
    font-weight: lighter;
}

.distance {
    font-size: 0.8rem;
}

.note {
    margin-right: 0.2rem;
}

.star {
    display: inline-block;
    font-size: 0.9rem;
}

.nameCotation {
    display: inline-block;
}

div.selectLocation label {
    margin-bottom: 0.6rem;
}

.warning-canyon {
    font-size: 0.9rem;
}

.red {
    color: red;
}
.arrow-down {
    position: absolute;
    left: 50%;
    top: 100%;
    font-size: 1rem;
    transform: translateX(-50%) translateY(-130%) scale(0);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease, color 0.3s ease;
    color: #999999;
    display: inline-block;
    padding: 5px;
    z-index: 10000;

    animation: bounceArrow 1s infinite ease-in-out;
    /* animation: transform 0.3s ease; Pour la rotation */
}

li.canyon:hover .arrow-down {
    transform: translateX(-50%) translateY(-130%) scale(1);
    opacity: 1;
}

li.canyon:hover .arrow-down:hover {
    color: #414141;
    animation-play-state: paused; /* pause animation */
}

/* Animation séparée uniquement sur Y */
@keyframes bounceArrow {
    0% {
        transform: translateX(-50%) translateY(-133%) scale(1);
    }
    50% {
        transform: translateX(-50%) translateY(-117%) scale(1);
    }
    100% {
        transform: translateX(-50%) translateY(-133%) scale(1);
    }
}

@media screen and (max-width: 600px) {
    div.divSearch {
        flex-direction: column;
    }

    div.selectLocation {
        width: 100%;
    }

    input#search,
    input#coordonnee,
    div ul#suggestions,
    select#maxTime {
        width: 100%;
        margin-left: 0;
    }

    select#maxTime {
        margin-bottom: 2rem;
    }

    h1 {
        padding: 1rem;
    }

    .canyon-list {
        display: flex;
        flex-direction: column;
    }

    .arrow-down {
        opacity: 1;
        animation-play-state: paused;
    }
}

li.canyon.expanded {
    grid-column: 1 / -1;
    grid-template-columns: 1fr;
    background-color: #f8f8f8;
}

.canyon-extra {
    display: none;
    grid-column: 1 / -1;
}

li.canyon.expanded .canyon-extra {
    display: block;
}

div.divNote {
    z-index: 10;
}

div.canyon-extra button {
    z-index: 100;
    position: relative;
}

pre {
    /*TODO: temp juste pour que ca soit responsive */
    white-space: pre-wrap;
    word-wrap: break-word;
    overflow-x: auto;
    max-width: 100%;
    box-sizing: border-box;
}
