@import 'css/header.css';
@import 'css/footer.css';
@import 'css/navbar.css';

body {
    margin: 0;
    padding: 0;
    font-family: "Montserrat", sans-serif;
    box-sizing: border-box;
    background-color: #f9f9f9;
    color: #3D3D3D;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.content,
.formulaire {
    display: flex;
    flex-direction: column;
    width: 90%;
    max-width: 1000px;
    margin: auto;
}

#recherche-accueil {
    height: 100vh;
    justify-content: center;
    align-items: center;
    /* width: 80%; */
}

.scroll-indicator {
    margin-top: -174px;
    margin-bottom: 64px;
    color: white;
    text-align: center;
    font-weight: bold;
    font-size: 18px;
}

.scroll-indicator p {
    margin-bottom: 0px;
    font-size: 24px;
}

.material-symbols-rounded {
    font-size: 48px !important;
    transform: translate3d(0px, 0px, 0px);
    animation: scroll 1.2s infinite linear;
}

@keyframes scroll {
    50% {
        transform: translate3d(0px, 8px, 0px);
    }
}

.background-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background-image: url('img/illustration.webp');
    background-size: cover;
    background-position: 80% bottom;
    filter: brightness(0.55);
}

.seine-maritime-logo {
    padding-left: 4px;
}

a img {
    text-decoration: none;
}

.main-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 80%;
}

.center-logo {
    width: 300px;
    height: auto;
    margin-bottom: 30px;
}

.logo-container {
    flex: 0 0 auto;
}

.logo {
    height: 40px;
    width: auto;
}

.main-content .search-bar {
    width: 100%;
    max-width: 600px;
}

.search-bar {
    position: relative;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    background-color: white;
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.1);
    padding: 10px;
    border-radius: 25px;
    border: solid 0.5px #ddd;
    z-index: 1000;
    overflow: hidden;
}

.search-bar input {
    padding: 0 10px;
    border: none;
    outline: none;
    font-size: 16px;
    border-radius: 25px;
    width: 100%;
}

/* .sidebar #searchInput {
    width: 100%;
} */

.search-bar .search-icon {
    font-size: 24px;
    color: #aaa;
    margin-right: 10px;
}

#markerCount {
    margin-bottom: 10px;
    color: #555;
}

#filterPanel {
    width: 100%;
    overflow-y: auto;
    background-color: white;
    box-shadow: none;
    border-radius: 0;
}

.filter-options {
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    margin-top: 5px;
}

.filter-options label,
.filterType label {
    margin-bottom: 5px;
    font-size: 14px;
}

.filter-options label {
    display: flex;
    align-items: center;
}

.filter-panel-sidebar {
    margin-top: 20px;
}

.filter-header {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 10px;
}

.filter-options input {
    margin-right: 10px;
}

input {
    accent-color: #004156;
}

.main-text {
    color: white;
    font-size: 18px;
    text-align: center;
}

.main-text .initiative {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 10px;
}

.news-section {
    text-align: center;
    margin: 15px 0px;
    width: 90%;
    max-width: 1000px;
}

.news-title,
.producteurs-title {
    text-align: center;
    font-size: 1.2em;
    margin: 20px auto;
    /* padding: 10px; */
    /* background-color: white; */
    /* box-shadow: 0 1px 5px rgba(0, 0, 0, 0.1); */
    width: fit-content;
    /* border-radius: 10px; */
}

.news-items {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    padding: 0 10px;
}

.news-item {
    background: white;
    border-radius: 15px;
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 1000px;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: transform 0.3s;
    height: 400px;
    overflow: hidden;
}

.news-item:hover,
.producteurs-item:hover {
    transform: translateY(-5px);
}

.news-image {
    order: 1;
    background-size: cover;
    background-position: center;
    width: 100%;
    height: 100%;
}

.news-text {
    order: 2;
    color: #3D3D3D;
    padding: 10px;
    text-align: center;
}

.news-text h3 {
    font-size: 1.5em;
    margin: 0;
}

.news-text p {
    color: #666;
}

.article {
    margin-bottom: 20px;
    overflow: auto;
}

.actupanier {
    margin-bottom: 20px;
    padding: 20px;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 10px;
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.1);
}

.actupanier img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}

.actupanier h2 {
    margin: 10px 0;
}

.actupanier h3,
.preview-content h3 {
    font-size: 16px;
    font-weight: normal;
    color: #666;
}

.actupanier p {
    font-size: 16px;
    color: #666;
    line-height: 1.6;
}

.preview-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: none;
    /* Cach� par d�faut */
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.preview-content {
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.1);
    max-width: 80%;
    max-height: 80%;
    overflow: auto;
    padding: 10px 20px;
    position: relative;
}

.preview-content img {
    max-width: 100%;
    height: auto;
}

.close-btn {
    position: absolute;
    top: 10px;
    right: 16px;
    font-size: 32px;
    cursor: pointer;
    color: #333;
}

.more-info-btn,
#moreInfoButton,
.all-news-btn,
.all-producteurs-btn,
.valider,
input[type=file]::file-selector-button {
    display: inline-block;
    margin: 10px 0px;
    padding: 10px 20px;
    background-color: #004156;
    color: white;
    border-radius: 30px;
    text-decoration: none;
    font-size: 14px;
    transition: background-color 0.3s;
    font-family: "Montserrat", sans-serif;
    text-align: center;
    width: fit-content;
    border: none;
    cursor: pointer;
}

.all-news-btn,
.all-producteurs-btn {
    margin-top: 20px;
}

.more-info-btn:hover,
#moreInfoButton:hover,
.all-news-btn:hover,
.all-producteurs-btn:hover,
.valider:hover,
input[type=file]::file-selector-button:hover {
    background-color: #008f8d;
}

.producteurs-section {
    width: 90%;
    text-align: center;
    margin: 15px 0px;
}

.producteurs-items {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    flex-direction: column;
    align-items: center;
}

.producteurs-item {
    width: 95%;
    height: 250px;
    position: relative;
    overflow: hidden;
    background-image: url('img/images.png');
    background-size: cover;
    background-position: center;
    color: white;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    text-align: center;
    border-radius: 15px;
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.1);
    padding: 20px;
    flex: 1;
    box-sizing: border-box;
    transition: transform 0.3s;
}

.producteurs-item h3 {
    margin: 0 auto;
    padding: 10px;
    /* background-color: white; */
    background-color: #00000099;
    /* color: #3D3D3D; */
    color: white;
    border-radius: 8px;
    /* box-shadow: 0 1px 5px rgba(0, 0, 0, 0.1); */
    box-sizing: border-box;
    font-size: 20px;
    width: fit-content;
    text-align: center;
}

.producer-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: space-between;
}

.producer-card {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: end;
    height: 250px;
    width: 100%;
    box-sizing: border-box;
    transition: transform 0.3s;
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.1);
    text-decoration: none;
}

.producer-card:hover {
    transform: scale(1.05);
}

.producer-card h2 {
    /* background-color: #fff; */
    background-color: #00000099;
    color: white;
    padding: 10px;
    margin: 0 auto;
    font-size: 20px;
    /* box-shadow: 0 1px 5px rgba(0, 0, 0, 0.1); */
    border-radius: 8px;
    width: fit-content;
    text-align: center;
}
.producer-card h4 {
    /* background-color: #fff; */
    background-color: #00415699;
    color: white;
    padding: 4px;
    margin: 0 auto;
    font-size: 13px;
    /* box-shadow: 0 1px 5px rgba(0, 0, 0, 0.1); */
    border-radius: 8px;
    width: fit-content;
    text-align: center;
}

/* .discover-button {
    display: block;
    padding: 10px 0;
    background-color: #004156;
    color: white;
    text-align: center;
    text-decoration: none;
    font-size: 14px;
    transition: background-color 0.3s;
    border-radius: 5px;
    width: 100%;
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.1);
}

.discover-button:hover {
    background-color: #CBD8DD;
    color: #00232E;
}

.discover-button i {
    margin-right: 5px;
} */

.filter-buttons {
    margin-bottom: 20px;
    display: flex;
    gap: 10px;
}

.filter-buttons button {
    background-color: #004156;
    color: white;
    border: none;
    padding: 10px 20px;
    font-size: 14px;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
    width: 100%;
}

.filter-buttons button.active {
    background-color: #CBD8DD;
    color: #004156;
    font-weight: bold;
}

.filter-buttons button:hover {
    background-color: #00A2B3;
    color: #00232E;
}

#map {
    flex: 1;
    position: relative;
}

.contentmap {
    height: 100vh;
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 00px;
    left: 0px;
    bottom: 60px;
    right: 0;
}

#loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #ccc;
    border-top-color: #004156;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.marker-cluster-large,
.marker-cluster-medium,
.marker-cluster-small {
    background-color: rgba(29, 123, 139, 0.6) !important;
}

.marker-cluster div {
    background-color: #1d7b8b !important;
    color: white;
}

.info-panel {
    margin-bottom: 52px;
    position: fixed;
    bottom: -100%;
    left: 0;
    width: 100%;
    max-width: 100%;
    height: auto;
    background-color: white;
    box-shadow: 0 -1px 5px rgba(0, 0, 0, 0.1);
    transition: bottom 0.3s ease-in-out;
    z-index: 999;
    padding: 15px 0px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    font-family: Arial, sans-serif;
}

.info-header {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 10px;
    text-align: center;
}

.info-content {
    font-size: 14px;
    flex: 1;
    overflow-y: auto;
    text-align: center;
}

.info-address {
    font-size: 14px;
    margin-bottom: 5px;
}

.info-hours {
    font-size: 16px;
    color: #5E7C27;
}

#infoCategories {
    display: flex;
    gap: 0px 5px;
    flex-wrap: wrap;
    justify-content: center;
}

#infoCategories strong {
    width: 100%;
    padding: 10px 0px;
}

#infoCategories p {
    display: inline-block;
    font-size: 14px;
    font-weight: normal;
    background-color: #b7c64b;
    color: #00232E;
    height: 24px;
    border-radius: 24px;
    padding: 0 10px;
    line-height: 24px;
    margin: 0 4px 5px 0;
}

/* .more-info {
    background-color: #004156;
    border: none;
    color: white;
    padding: 10px 20px;
    cursor: pointer;
    border-radius: 4px;
    margin-top: 10px;
    display: inline-block;
    text-decoration: none;
    font-size: 14px;
    text-align: center;
    width: fit-content;
    margin: 10px auto 0;
} */

.info-panel.show {
    bottom: 0;
}

.info-panel-content {
    margin: 10px 0px;
    width: 50%;
}

.info-panel-content p {
    margin: 5px 0;
}

.sidebar {
    position: fixed;
    left: 0;
    top: -100%;
    width: calc(100% - 40px);
    padding: 20px;
    background: #fff;
    box-shadow: 1px 0 5px rgba(0, 0, 0, 0.1);
    transition: top 0.3s ease-in-out;
    z-index: 1100;
}

.sidebar.active {
    top: 0;
}

#searchButton {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 30px;
    background-color: #004156;
    color: white;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    margin-top: 20px;
}

#searchButton:hover {
    background-color: #008f8d;
}

.toggle-sidebar-btn {
    position: fixed;
    top: 11px;
    right: 10px;
    background-color: #004156;
    color: white;
    box-shadow: 0 0px 5px dimgrey;
    border: none;
    padding: 10px 20px;
    cursor: pointer;
    font-size: 18px;
    z-index: 1000;
    border-radius: 5px;
}

.geolocation-btn {
    position: fixed;
    top: 11px;
    left: 50px;
    background-color: #CBD8DD;
    color: #00232E;
    box-shadow: 0 0px 5px dimgrey;
    border: none;
    padding: 10px 20px;
    cursor: pointer;
    font-size: 18px;
    z-index: 1000;
    border-radius: 5px;
}

.toggle-sidebar-btn i {
    font-size: 20px;
}

/* .navbar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: space-around;
    align-items: center;
    background-color: #ffffff;
    padding: 10px 0;
    box-shadow: 0 -1px 5px rgba(0, 0, 0, 0.1);
    z-index: 10000;
}

.nav-item {
    color: #00A2B3;
    text-decoration: none;
    font-size: 12px;
    text-align: center;
    flex: 1;
    padding: 0 10px;
}

.nav-item i {
    display: block;
    font-size: 18px;
    margin-bottom: 2px;
}

.nav-item span {
    display: block;
    font-size: 11px;
} */

/* .central-item {
    background-color: #00A2B3;
    color: #ffffff;
    border-radius: 50%;
    padding: 5px;
    margin-top: 0;
    flex: none;
    width: 50px;
    height: 50px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.central-item i,
.central-item span {
    color: #ffffff;
    font-size: 11px;
} */

.nav-item:hover {
    background-color: #CBD8DD;
    color: #00232E;
}

/* .central-item:hover {
    color: #ffffff;
} */

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px;
    margin-top: 20px;
    /* background-color: #fff;
    border-radius: 15px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); */
}

.pagination-link {
    display: inline-block;
    padding: 10px 15px;
    margin: 0 5px;
    border: 1px solid #ddd;
    color: #3D3D3D;
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.3s, color 0.3s;
}

.pagination-link:hover {
    background-color: #f0f0f0;
}

.pagination-link.active {
    background-color: #004156;
    color: #fff;
    /* border-radius: 15px; */
    font-weight: bold;
}

/* .pagination-link:first-child,
.pagination-link:last-child {
    border-radius: 15px;
} */

.contacts {
    display: flex;
    flex-direction: column;
    width: 90%;
    gap: 10px;
}

.contact-form-container,
.info-container {
    background-color: #fff;
    border-radius: 10px;
    padding: 10px 30px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
    height: fit-content;
}

.contact-form-container input[type="text"],
.contact-form-container input[type="email"],
.contact-form-container input[type="tel"],
.contact-form-container textarea {
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    box-sizing: border-box;
}

.button {
    display: flex;
    justify-content: center;
}

.contact-form-container button,
.download-btn {
    background-color: #004156;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 35px;
    cursor: pointer;
    font-size: 1rem;
    margin: 10px 0px;
}

.contact-form-container button:hover,
.download-btn:hover {
    background-color: #005f73;
}

.contact-form-container .aster {
    font-size: 0.9rem;
    color: #666;
}

.contact-form-container .aster input[type="checkbox"] {
    width: auto;
    margin-right: 5px;
}

.form-group {
    margin-bottom: 4px;
}

.form-group label {
    display: block;
    font-weight: bold;
    margin-bottom: 5px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border-radius: 5px;
    border: 1px solid #ccc;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
}

.form-group input[type="checkbox"] {
    width: auto;
    margin-right: 10px;
}

.rgpd {
    display: flex;
    align-items: flex-start;
}

.success-message {
    text-align: center;
    font-size: 16px;
    color: #61791b;
    margin-bottom: 20px;
    background: #f1ffca;
    padding: 10px;
    border-radius: 5px;
}

.info-container a {
    color: #00829B;
}

.page404 {
    display: flex;
    height: 100vh;
    align-items: center;
    text-align: center;
}

.page404 h1 {
    font-size: 200px;
    color: #dedede;
    margin: 0;
    line-height: 200px;
}

.page404 a {
    color: #00a2b3;
    text-decoration: none;
}

.formulaire .container {
    padding: 20px;
    background-color: #FFF;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.ligne {
    display: flex;
    flex-direction: column;
    gap: 30px;
    margin: 20px 0;
}

.formulaire input {
    width: 300px;
    border: 2px solid #EEE;
    height: 38px;
    padding: 0 10px;
    font-size: 15px;
    background-color: #EEE !important;
    border-radius: 5px;
}

input[type=file] {
    width: 350px;
    max-width: 100%;
    border: none;
    height: fit-content;
    padding: 0;
    background-color: white !important;
}

input[type=file]::file-selector-button {
    margin-right: 10px;
}

.formulaire h2 {
    margin: 0 0 10px 0;
    font-weight: bold;
    color: #000;
    font-size: 20px;
    border-bottom: 1px solid #EEE;
    padding-bottom: 8px;
}

.coordonnees div {
    display: flex;
    /* justify-content: space-between; */
    margin-bottom: 5px;
    flex-direction: column;
}

.flex {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.flex h3 {
    width: 200px;
}

/* .coordonnees div input {
    width: 50%;
} */

.formulaire label {
    font-weight: bold;
    /* padding-bottom: 10px; */
    width: 200px;
    display: flex;
    align-items: center;
}

.ck-content {
    height: 200px;
    padding: 20px !important;
}

#scroll {
    height: 200px;
    /* width: 100%; */
    overflow-y: scroll;
    background-color: white;
    /* border: solid 0.5px #ddd;
    padding: 5px; */
    border-radius: 5px;

    padding: 20px;
    border: 1px solid #EEE;
}

.formulaire .checkboxes {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    /* gap: 30px; */
}

.formulaire .checkboxes div {
    /* width: calc(100% / 3 - 20px); */
    width: 200px;
    padding: 0 10px;
}

.photos {
    display: flex;
    flex-direction: column;
}

.photo {
    position: relative;
    width: 130px;
    height: 130px;
    float: left;
    background-size: cover;
    margin: 0 5px 5px 0;
}

.photo a {
    cursor: pointer;
    position: absolute;
    display: block;
    width: 24px;
    height: 24px;
    line-height: 24px;
    background-color: #004156;
    text-align: center;
    color: #FFF;
    border-radius: 5px;
}

.photo .next,
.photo .prev {
    bottom: 0;
    left: 0;
}

.photo .del {
    top: 0;
    right: 0;
}


/* Styles pour les �crans plus grands */
@media (min-width: 769px) {

    #page-content,
    .formulaire {
        margin-top: 80px;
    }

    .container {
        padding-top: 10px;
    }

    .navbar {
        display: none;
    }

    .main-content {
        width: 56%;
    }

    .more-info-btn,
    #moreInfoButton {
        margin-top: 20px;
    }

    .news-items {
        gap: 40px;
    }

    .news-title,
    .producteurs-title {
        font-size: 1.6em;
    }

    .news-item {
        flex-direction: row;
        height: 200px;
    }

    .news-text {
        flex: 1;
        display: flex;
        flex-direction: column;
        justify-content: center;
        border-right: 1px solid #ddd;
        order: 1;
        text-align: left;
        padding: 20px;
    }

    .news-text p {
        display: block;
        margin: 5px 0 0;
    }

    .news-image {
        flex: 0 0 40%;
        height: 100%;
        order: 2;
    }

    .contentmap,
    #loader {
        top: 80px;
        left: 290px;
        max-width: calc(100% - 290px);
        max-height: calc(100% - 80px);
    }

    #loader {
        width: calc(100% - 290px);
        height: calc(100% - 80px);
    }

    .producteurs-item {
        flex: 1;
        width: 250px;
    }

    .producer-card {
        width: calc(100%/3 - 20px);
    }

    .navbar {
        display: none;
    }

    .info-panel {
        left: 290px !important;
        width: calc(100% - 290px) !important;
        margin-bottom: 0px;
    }

    .sidebar {
        top: 70px !important;
        left: 0;
        width: 250px;
        height: 100%;
        transition: none;
    }

    .toggle-sidebar-btn {
        display: none;
        /* Cache le bouton sur desktop */
    }

    .geolocation-btn {
        top: 91px;
        left: 344px;
    }

    .producteurs-items {
        flex-direction: row;
    }

    .contacts {
        margin-top: 90px;
        width: 80%;
        flex-direction: row;
    }

    .info-container {
        width: 100%;
    }

    .formulaire .container {
        padding: 60px 100px;
    }

    .coordonnees div {
        flex-direction: row;
    }
}