/* 
    ====================================================================================================
    ====================================================================================================
    ====================================================================================================
                                                 BASE
    ====================================================================================================
    ====================================================================================================
    ====================================================================================================
*/

body {
    display: flex;
    flex-direction: column;
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    height: 100vh;
    max-width: 100vw;
    box-sizing: border-box;
    background-color: rgba(0,0,0,0.02);
}

main {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 0;
    box-sizing: border-box;
    background-color: rgba(0,0,0,0.02);
    width: 100%;
    max-width: 100vw;
}

/* 
    ====================================================================================================
    ====================================================================================================
    ====================================================================================================
                                TOP CONTAINER (IMG + SEARCH BAR) 
    ====================================================================================================
    ====================================================================================================
    ====================================================================================================
*/

.top-container {
    position: relative;
    width: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 0;
    box-sizing: border-box;
    background-color: rgba(230, 243, 255, 0.8);
}

/* Image de recherche */
.img-container {
    width: 100%;
    max-width: 100vw;
    height: 300px;
    overflow: hidden;
    margin-top: 0;
}

.img-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

/* Container title + search bar */
.search-container {
    display: flex;
    width: 100%;
}

/* 
    ====================================================================================================
    ====================================================================================================
    ====================================================================================================
                                        SEARCH BAR DESKTOP 
    ====================================================================================================
    ====================================================================================================
    ====================================================================================================
*/

.search-bar-desktop {
    display: flex;
    align-items: center;
    justify-content: center;
    
    top: calc(300px - 60px + 30px);
    height: 60px;
    width: 90%;
    
    background-color: rgba(255, 255, 255, 1);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    border-radius: 20px;
    border: none;
    
    margin: 0;
    padding: 0;
    overflow: hidden;
    
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.search-bar-desktop form {
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    width: 100%;
    height: 100%;
    padding: 0;
    margin: 0;
    border: none;
}

.search-bar-desktop form .field-button {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex: 1;
    padding: 0;
    margin: 0 0;
    border: none;
    border-radius: 10px;
    width: 95%;
    height: 100%;
    font-size: 1rem;
    background-color: rgba(0, 0, 0, 0);
    box-shadow: none;
    box-sizing: border-box;
}

.search-bar-desktop form .field-button:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.search-bar-desktop form .field-button .field-button-content {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    box-sizing: border-box;
    height: 100%;
    color: rgba(0,0,0,0.5);
}

.search-bar-desktop form .field-button .field-button-content svg {
    padding: 10px;
    height: 20px;
    width: 20px;
    color: #000000;
}

.search-bar-desktop form .field-button .field-button-content .field-button-text {
    margin-left: 0px;
    padding: 5px;
}

.search-bar-desktop button {
    display: flex;
    justify-content: center;
    height: 100%;
    background-color: #1e3c72;
    color: #fff;
    border: none;
    padding: 20px;
    cursor: pointer;
    font-size: 1rem;
    border-radius: 0;
    transition: background-color 0.3s;
    margin-left: 0;
    margin: 0;
}

.search-bar-desktop .search-button:hover {
    background-color: #163b61;
}

.search-bar-desktop .separator {
    border-left: 2px solid #ccc;
    height: 40px;
    margin: 0 10px;
}

/* 
    ====================================================================================================
    ====================================================================================================
    ====================================================================================================
                                        SEARCH BAR MOBILE 
    ====================================================================================================
    ====================================================================================================
    ====================================================================================================
*/

.search-bar-mobile {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    
    top: 15vh;
    width: 75%;
    height: 40vh;
    max-width: 800px;
    
    background-color: rgba(255, 255, 255, 1);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    border-radius: 20px;
    margin: 0px;
    overflow: hidden;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.search-bar-mobile form {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    width: 100%;
    height: 100%;
    padding: 0;
    margin-top: 10px;
}

.search-bar-mobile form .field-button {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex: 1;
    padding: 0;
    margin: 0 0;
    border: none;
    border-radius: 10px;
    width: 95%;
    font-size: 1rem;
    background-color: rgba(0, 0, 0, 0);
    box-shadow: none;
    box-sizing: border-box;
}

.search-bar-mobile form .field-button:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.search-bar-mobile form .field-button .field-button-content {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    box-sizing: border-box;
    height: 100%;
    color: rgba(0,0,0,0.5);
}

.search-bar-mobile form .field-button .field-button-content svg {
    padding: 10px;
    height: 20px;
    width: 20px;
    color: #000000;
}

.search-bar-mobile form .field-button .field-button-content .field-button-text {
    margin-left: 0px;
    padding: 5px;
}

.search-bar-mobile button {
    display: flex;
    justify-content: center;
    width: 100%;
    background-color: #1e3c72;
    color: #fff;
    border: none;
    padding: 20px; /* Augmenter le padding pour une hauteur accrue */
    cursor: pointer;
    font-size: 1rem;
    border-radius: 0px;
    transition: background-color 0.3s;
    margin-left: 0;
    margin-top: 10px;
}

.search-bar-mobile .search-button:hover {
    background-color: #163b61;
}

.search-bar-mobile .separator {
    width: 90%;
    border: none;
    border-top: 2px solid rgba(0, 0, 0, 0.2); /* Couleur de la ligne */
    margin: 5px 0; /* Espacement vertical autour de la ligne */
}

/* 
    ====================================================================================================
    ====================================================================================================
    ====================================================================================================
                                DESKTOP INPUT CONTAINERS - LOCATION
    ====================================================================================================
    ====================================================================================================
    ====================================================================================================
*/

.location-input-container-desktop {
    
    display: none;
    position: absolute;
    justify-content: center;
    align-items: center;
    
    top: calc(300px - 30px);
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-height: 50vh;
    
    background-color: rgba(255,255,255,0);
    z-index: 1000;
}

.location-input-bar-desktop {
    display: flex;
    align-items: center;
    top: 0;
    margin: 0;
    height: 60px;
    border-radius: 20px;
    border: 2px solid;
    border-color: rgba(30,63,116,1);
    background-color: white;
    overflow: hidden;
}

.location-input-desktop {
    flex-grow: 1;
    border: none;
    padding: 12px 16px;
    font-size: 16px;
    outline: none;
}

.location-back-button-desktop,
.location-clear-button-desktop {
    background: none;
    border: none;
    padding: 12px;
    cursor: pointer;
    font-size: 18px;
    color: #333;
}

.suggestions-desktop {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-height: calc(50vh - 60px);
    background: rgba(255,255,255,0.9);
    overflow-y: auto;
    border-radius: 0 0 20px 20px;
}

.suggestion-item {
    display: flex;
    align-items: center;
    margin-left: 2vw;
    border-bottom: 1px solid;
    border-color: rgba(0,0,0,0.2);
    cursor: pointer;
    min-height: 60px;
}

.suggestion-item:last-child {
    border-bottom: none;
}

.suggestion-item:hover {
    background-color: #f5f5f5;
}

/* 
    ====================================================================================================
    ====================================================================================================
    ====================================================================================================
                                DESKTOP INPUT CONTAINERS - SLOTS
    ====================================================================================================
    ====================================================================================================
    ====================================================================================================
*/

.slots-input-container-desktop {
    position: absolute;
    top: calc(300px - 30px + 60px);
    left: 50%;
    width: 40%;
    background-color: #ffffff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    z-index: 1000;
    display: none;
}

.slots-box-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
}

#slots-decrease-button,
#slots-increase-button {
    width: 40px;
    height: 40px;
    border-radius: 20px;
    border: none;
    background-color: #f0f0f0;
    font-size: 20px;
    font-weight: bold;
    color: #333;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

#slots-decrease-button:hover,
#slots-increase-button:hover {
    background-color: #e0e0e0;
}

#slots-count {
    font-size: 24px;
    font-weight: bold;
    color: #333;
    min-width: 40px;
    text-align: center;
}

/* 
    ====================================================================================================
    ====================================================================================================
    ====================================================================================================
                                DESKTOP INPUT CONTAINERS - DATE
    ====================================================================================================
    ====================================================================================================
    ====================================================================================================
*/

.date-input-container-desktop {
    display: none;
    position: absolute;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    box-sizing: border-box;
    
    top: calc(300px - 30px + 60px);
    left: 45%;
    transform: translate(-50%, 0); /* Centrage horizontal par défaut */    
    /*width: 50%;*/
    /*height: 50%;*/
    
    background: white;
    border: 1px solid;
    border-color: rgba(0,0,0,0.2);
    border-radius: 4px;
    padding: 10px;
    z-index: 1000;
}

.date-input-container-desktop .flatpickr-calendar {
    box-shadow: none;
    border: none;
}

.date-input-container-desktop .flatpickr-day.today {
    background-color: navy; /* Couleur de fond bleu marine */
    color: white; /* Couleur du texte */
}


/* 
    ====================================================================================================
    ====================================================================================================
    ====================================================================================================
                                MOBILE INPUT CONTAINERS - LOCATION
    ====================================================================================================
    ====================================================================================================
    ====================================================================================================
*/

.location-input-container-mobile {
    
    display: none;
    position: fixed;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    box-sizing: border-box;
    
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    
    background-color: rgba(255,255,255, 0.95);
    z-index: 1000;
    padding: 0;
}

.location-input-bar-mobile {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 95%;
    border-radius: 10px;
    background-color: white;
    border: 1px solid black ;
    margin-top: 5%;
}

.location-input-mobile {
    flex: 1;
    width: 100%;
    height: 100%;
    font-size: 1.5rem;
    border: none;
    border-radius: 10px;
    box-sizing: border-box;
    position: relative;
    color: rgba(0,0,0,0.6);
}

.location-input-mobile:focus {
    outline: none;
    border: none;
    box-shadow: none;
}

.location-back-button-mobile,
.location-clear-button-mobile {
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    font-size: 18px;
    color: #333;
}

.suggestions-mobile {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    overflow-y: auto;
}

.suggestion-item {
    display: flex;
    align-items: center;
    height: 10%;
    margin-left: 2vw;
    border-bottom: 1px solid;
    border-color: rgba(0,0,0,0.2);
    cursor: pointer;
}

.suggestion-item:last-child {
    border-bottom: none;
}

.suggestion-item:hover {
    background-color: #f5f5f5;
}

/* 
    ====================================================================================================
    ====================================================================================================
    ====================================================================================================
                                MOBILE INPUT CONTAINERS - SLOTS
    ====================================================================================================
    ====================================================================================================
    ====================================================================================================
*/

.slots-input-container-mobile {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    margin: 0;
    padding: 0;
    border: none;
    box-sizing: border-box;
    background-color: rgba(0,0,0,0.9);
}

.slots-box-content-mobile {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    border: none;
    box-sizing: border-box;
}

.slots-box-content-mobile-top-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 10%;
}

.slots-back-button-container {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    width: 90%;
    
}
#slots-back-button-mobile {
    display: flex;
    background: none;
    border: none;
    cursor: pointer;
}

#slots-back-button-mobile svg {
    height: 50px;
    width: 50px;
}

.slots-box-content-mobile-bottom-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 10%;
}

.slots-validate-button-container {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    width: 90%;
    
}

#slots-validate-button-mobile {
    display: flex;
    background: none;
    border: none;
    cursor: pointer;
}

#slots-validate-button-mobile svg {
    height: 50px;
    width: 50px;
}

.slots-box-content-mobile-middle-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 90%;
    height: 80%;
}

.title-slots-count-mobile {
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    width: 100%;
    font-size: 60px;
    font-weight: bold;
    color: white;
    padding: 0;
    margin-bottom: 10%;
}

.modify-slots-count-mobile {
    display: flex;
    justify-content: space-evenly;
    align-items: center;
    width: 100% ;
    padding: 0;
}

.modify-slots-count-mobile button {
    display: flex;
    justify-content: center;
    align-items: center;
    background: none;
    border: none;
    cursor: pointer;
}

#slots-count-mobile {
    font-size: 80px;
    font-weight: bold;
    text-align: center;
    color: white;
}

/* 
    ====================================================================================================
    ====================================================================================================
    ====================================================================================================
                                MOBILE INPUT CONTAINERS - DATE
    ====================================================================================================
    ====================================================================================================
    ====================================================================================================
*/

.date-input-container-mobile {
    display: none;
    position: fixed;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    box-sizing: border-box;
    
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    
    background: white;
    border: none;
    padding: 0;
    z-index: 1000;
}

.title-date-input-mobile {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    box-sizing: border-box;
    height: 30%;
    width: 100%;
    padding: 10%;
    font-size: 30px;
    font-weight: bold;
    color: rgba(0,0,0,0.6);
    word-wrap: break-word;
}

.date-input-container-mobile #flatpickr-container-mobile {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    width: 100%;
    height: 70%;
    padding-top: 20px;
}

.date-input-container-mobile .flatpickr-calendar {
    box-shadow: none;
    border: none;
    margin: 0;
}

.date-input-container-mobile .flatpickr-day.today {
    background-color: navy;
    color: white;
}

/* 
    ====================================================================================================
    ====================================================================================================
    ====================================================================================================
                                        SEARCH RESULTS
    ====================================================================================================
    ====================================================================================================
    ====================================================================================================
*/

.search-results {
    padding-top: 20px;
    border-radius: 10px;
    width: 100%;
    max-width: 800px;
    margin-top: 70px;
}

.search-results h2 {
    margin-bottom: 20px;
    color: #003366;
    font-size: 1.5rem;
    text-align: center;
    font-weight: 700;
}

.search-results ul {
    list-style-type: none;
    padding: 0;
    margin: 0;
}

.search-results li {
    background-color: #FFFFFF;
    box-shadow: 0 4px 8px rgba(0, 102, 204, 0.1);
    margin-bottom: 20px;
    border-radius: 10px;
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    align-items: center;
}

.search-results li:hover {
    background-color: #e6f3ff;
    box-shadow: 0 4px 10px rgba(0, 102, 204, 0.2);
}

.session-form {
    display: flex;
    align-items: center;
    margin: 0;
    padding: 0;
    border: none;
    background: none;
    width: 100%;
    box-sizing: border-box;
}

.session-form button {
    display: flex;
    align-items: center;
    width: 100%;
    border: none;
    padding: 10px;
    border-radius: 10px;
    cursor: pointer;
    box-sizing: border-box;
    background-color: #FFFFFF;
    box-shadow: 0 4px 8px rgba(0, 102, 204, 0.1);
}

.session-form button:hover {
    background-color: #e6f3ff;
    box-shadow: 0 8px 20px rgba(0, 102, 204, 0.2);
}

.search-results li .session-bloc-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: inherit;
    width: 100%;
    box-sizing: border-box;
}

.search-results li .session-bloc-left,
.search-results li .session-bloc-center,
.search-results li .session-bloc-right {
    padding: 5px;
    font-family: 'Acme', sans-serif;
}

.search-results li .session-bloc-left {
    flex: 1;
    text-align: center;
    max-width: 10%;
}

.search-results li .session-bloc-left .day-name {
    font-size: 0.8rem;
    color: #555;
    margin-bottom: 5px;
}

.search-results li .session-bloc-left .day-number {
    font-size: 2rem;
    color: #0066cc;
    margin-bottom: 5px;
    font-weight: bold;
}

.search-results li .session-bloc-left .month-name {
    font-size: 0.8rem;
    color: #555;
    font-weight: bold;
}

.search-results li .session-bloc-center {
    flex: 2;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border-left: 1px solid #b3d9ff;
    border-right: 1px solid #b3d9ff;
    color: black;
}

.search-results li .center-top {
    display: flex;
    flex-direction: row;
    align-items: center;
    font-weight: bold;
    text-align: center;
    padding: 10px;
    border-bottom: 1px solid #b3d9ff;
    color: black;
}

.search-results li .center-top .logo-location {
    margin-right: 20px;
}

.search-results li .center-top .text-location {
    color: black;
}

.search-results li .center-bottom {
    display: flex;
    justify-content: space-between;
}

.search-results li .center-bottom .organiser {
    display: flex;
    align-items: center;
    float: left;
    width: 30%;
    padding: 10px;
    border-right: 1px solid #b3d9ff;
    color: black;
}

.search-results li .center-bottom .organiser .logo-organiser {
    margin-right: 10px;
}

.search-results li .center-bottom .organiser .name-organiser {
    color: black;
}

.search-results li .center-bottom .fish-type {
    display: flex;
    align-items: center;
    float: left;
    width: 70%;
    padding: 10px;
    color: black;
}

.search-results li .center-bottom .fish-type .logo-fish {
    margin-right: 10px;
}

.search-results li .center-bottom .fish-type .text-fish {
    display: flex;
    align-items: center;
    color: black;
}

.search-results li .session-bloc-right {
    flex: 1;
    display: block;
    text-align: center;
    font-size: 1.5rem;
    font-weight: bold;
    color: #003366;
    max-width: 15%;
    text-decoration: none;
    height: 100%;
}

.search-results li .price {
    font-size: 2rem;
    color: #0066cc;
}

.search-results li strong {
    display: block;
    margin-bottom: 5px;
}


.session-unavailable {
    opacity: 0.5;
    position: relative;
}
.session-unavailable:hover {
    opacity: 0.7;
}
.session-unavailable::after {
    content: "Places insuffisantes";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(255, 0, 0, 0.8);
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 0.9rem;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.session-unavailable:hover::after {
    opacity: 1;
}


.no-results {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-top: 18vh;
    max-width: 100vw;
    box-sizing: border-box;
}

.no-results .bredouille {
    display: flex;
    font-size: 20px;
    font-style: italic;
    text-align: center;
}

.no-results svg {
    width: 200px;
    height: 200px;
    margin-top: 25px;
    margin-bottom: 25px;
}


/* 
    ====================================================================================================
    ====================================================================================================
    ====================================================================================================
                                        MEDIA QUERIES
    ====================================================================================================
    ====================================================================================================
    ====================================================================================================
*/


@media (max-width: 800px), (orientation: portrait) {
    .img-container {
        height: 40vh;
    }

    .search-bar-desktop {
        display: none;
    }
    .search-bar-mobile {
        display: flex;
    }
    
    .search-results {
        width: 95%;
        margin-top: 200px;
    }
    
    .autocomplete-suggestions {
        width: calc(100% - 30px);
        left: 15px;
    }

    .autocomplete-suggestion {
        padding: 10px 12px;
        font-size: 0.9rem;
    }
    
    .info-section {
        flex-direction: column;
        margin-top: 15vh;
    }
}
