/* Import des fonts */
@font-face {
    font-family: "Region Bretagne New";
    src: url("/assets/fonts/RegionBretagne-Reg.ttf") format("truetype");
    font-weight: normal;
    font-display: swap;
}

@font-face {
    font-family: "Region Bretagne New";
    src: url("/assets/fonts/RegionBretagne-Bold.woff") format("woff");
    font-weight: bold;
    font-display: swap;
}

/* Reset et styles globaux */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    height: 100%;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: #f5f5f5;
}

/* composant */
/* scroll bare custom */
.custom-scrollbar {
    scrollbar-width: auto;
    scrollbar-color: #9E6376 #F5F5F5;
}

.custom-scrollbar::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: #F5F5F5;
    border-radius: 999px;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background-color: #9E6376;
    border-radius: 999px;
    border: 2px solid #F5F5F5;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background-color: #7f4f5f;
}

.custom-scrollbar:focus-visible {
    outline: 3px solid rgba(158, 99, 118, 0.35);
    outline-offset: 3px;
}

/* Conteneur principal */
.app-container {
    display: flex;
    flex-direction: column;
    height: 100dvh;
    max-height: 100dvh;
    width: 100%;
}

/* Header - Mobile first */
.app-header {
    background-color: #000;
    border-bottom: 2px solid #333;
    padding: 6px 0 8px 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    z-index: 100;
}

.app-header .header-content {
    max-width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    height: auto;
    padding: 0 20px;
    position: relative;
}

.header-logo {
    height: 44px;
    width: auto;
    object-fit: contain;
    object-position: center;
}

.btn-connexion {
    position: absolute;
    right: 20px;
    background-color: #fff;
    color: #000;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    font-family: "Region Bretagne New";
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-connexion:hover {
    background-color: #f0f0f0;
    transform: scale(1.02);
}

.btn-connexion:active {
    transform: scale(0.98);
}

/* Bouton de déconnexion (style alternatif pour se distinguer) */
.btn-deconnexion {
    position: absolute;
    right: 20px;
    background-color: #ff6b6b;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    font-family: "Region Bretagne New";
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-deconnexion:hover {
    background-color: #ff5252;
    transform: scale(1.02);
}

.btn-deconnexion:active {
    transform: scale(0.98);
}

/* gestionaire de pages */
.map-page {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.home-page {
    padding: 16px 12px 0px 12px;
    flex-grow: 1;
    flex-basis: 0;
    flex-shrink: 1;
    overflow: hidden;
    min-height: 0;
}

.home-page .warpper-contenaire-card {
    height: 100%;
    min-height: 0;
    width: 100%;
    overflow-y: auto;
}

.home-page .contenaire-card {
    padding: 15px 0 130px 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Chargement accueil */
.home-loading {
    width: 100%;
    min-height: 180px;
    border-radius: 8px;
    background: #FFF;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
    position: relative;
    overflow: hidden;
}

.home-loading::after {
    content: "";
    position: absolute;
    z-index: 0;
    bottom: -45%;
    right: -7%;
    height: 150%;
    width: 100%;
    background-image: url(/assets/images/form_background.svg);
    background-repeat: no-repeat;
    background-position: right;
    background-size: contain;
    opacity: 0.25;
}

.home-loading__spinner {
    width: 34px;
    height: 34px;
    border: 4px solid #F5F5F5;
    border-top-color: #9E6376;
    border-radius: 50%;
    animation: homeLoadingSpin 0.8s linear infinite;
    position: relative;
    z-index: 1;
}

.home-loading__text {
    color: #5D5D5D;
    font-size: 14px;
    letter-spacing: -0.24px;
    position: relative;
    z-index: 1;
}

@keyframes homeLoadingSpin {
    to {
        transform: rotate(360deg);
    }
}

/* fin chargement acceil */

.hidden {
    display: none;
}

/* commun a toute les pages */
.contenaire-titre {
    position: relative;
}

.bnt-back {
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    background-color: #1E1E1E;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 3px;
    border: none;
    cursor: pointer;
}

.bnt-back img {
    transform: rotate(180deg);
    width: 13px;
    height: 13px;
    object-fit: cover;
    object-position: center;
}

h1 {
    color: #000;
    text-align: center;
    font-family: "Region Bretagne New";
    font-size: 24px;
    font-weight: 700;
    line-height: 140%;
}

/* card cannal */
.canal-card {
    width: 100%;
    padding: 16px;
    border-radius: 8px;
    height: 132px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}

.canal-card::after {
    content: "";
    position: absolute;
    z-index: 0;
    bottom: -45%;
    right: -7%;
    height: 150%;
    width: 100%;
    background-image: url(/assets/images/form_background.svg);
    background-repeat: no-repeat;
    background-position: right;
    background-size: contain;
    opacity: 0.4;
}

.canal-card__title {
    color: #1E1E1E;
    font-family: "Region Bretagne New";
    font-size: 24px;
    font-weight: 600;
    line-height: 140%;
    position: relative;
    z-index: 1;
}

.canal-card__footer {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: start;
    position: relative;
    z-index: 1;
}

.canal-card__status {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

.canal-card__status.canal-card__status--empty {
    cursor: default;
}

.canal-card__status-text {
    color: #5D5D5D;
    font-size: 12px;
    letter-spacing: -0.24px;
}

.canal-card__button {
    padding: 8px 30px 8px 8px;
    border-radius: 6px;
    background: #000;
    border: none;
    color: #FFF;
    font-size: 11px;
    letter-spacing: -0.22px;
    position: relative;
    cursor: pointer;
}

.canal-card__button::after {
    content: "";
    position: absolute;
    top: 50%;
    right: 8px;
    transform: translateY(-50%);
    height: 18px;
    width: 18px;
    background-image: url(/assets/images/icons/majesticons_arrow-up.svg);
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
}

.canal-card__metric {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 2px 10px 2px 2px;
    border-radius: 150px;
    background-color: #FFF;
}

.canal-card__metric-badge {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.canal-card__metric-badge-text {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #000;
    font-family: "Region Bretagne New";
    font-size: 10px;
}

.canal-card__metric-text {
    color: #000;
    font-size: 12px;
    letter-spacing: -0.24px;
}

/* fin card cannal */

/* Controls Section - Dropdown */
.controls-section {
    background-color: #F6F8F7;
    border-bottom: 2px solid #e0e0e0;
    padding: 1rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    z-index: 99;
}

.controls-content {
    max-width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: center;
}

.app-title {
    font-size: 1.5rem;
    color: #fff;
    margin-bottom: 1rem;
    font-weight: 600;
}

/* Dropdown styles */

.dropdown-channel {
    color: #000;
    font-size: 24px;
    font-weight: 700;
    line-height: 140%;
    font-family: "Region Bretagne New";
    width: fit-content;
    border-color: transparent;
    border-radius: 8px;
    border-width: 2px;
    text-align: center;
    padding: 0.75rem calc(0.75rem + 16px) 0.75rem 0.75rem;
    cursor: pointer;
    background-color: transparent;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    position: relative;

    background-image: url("/assets/images/icons/Chevron%20down.svg");
    background-repeat: no-repeat;
    background-position: right 0 center;
    background-size: 16px 16px;
}

.dropdown-sub-channel {
    width: 100%;
    max-width: 400px;
    padding: 0.75rem;
    font-size: 1rem;
    border: 2px solid #ddd;
    border-radius: 8px;
    background-color: #fff;
    color: #1a1a1a;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    -webkit-appearance: none;
    appearance: none;
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    padding-right: 2.5rem;
    position: relative;

    background-image: url("/assets/images/icons/Chevron%20down.svg");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 16px 16px;
}

.dropdown-channel:focus,
.dropdown-channel:hover,
.dropdown-sub-channel:focus,
.dropdown-sub-channel:hover {
    border-color: #4a90e2;
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
    outline: none;
}

.dropdown-channel:disabled,
.dropdown-sub-channel:disabled {
    background-color: #f0f0f0;
    opacity: 0.6;
    cursor: not-allowed;
}

/* Conteneur de la carte */
.map-container {
    flex: 1;
    width: 100%;
    min-height: 0;
    height: 100%;
    overflow: hidden;
    /* padding-bottom: 120px; */
}

.maps {
    height: 100%;
}

/* Modal styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: flex-end;
    z-index: 1010;
    animation: slideIn 0.3s ease;
}

.modal.hidden {
    display: none;
}

@keyframes slideIn {
    from {
        transform: translateY(100%);
    }

    to {
        transform: translateY(0);
    }
}

.modal-content {
    background-color: #fff;
    width: 100%;
    max-height: 80vh;
    border-radius: 16px 16px 0 0;
    padding: 24px 14px 24px 24px;
    position: relative;
    display: flex;
    flex-direction: column;
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #666;
    padding: 0.5rem;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s ease;
}

.modal-close:hover,
.modal-close:focus {
    background-color: #f0f0f0;
    outline: none;
}

.modal-content h2 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: #1a1a1a;
    padding-right: 2rem;
    font-family: 'Region Bretagne New';
}

/* Listes de bateaux */
.warpper-boats-list {
    overflow-y: auto;
    min-height: 0;
    flex: 1;
    padding-right: 10px;
}

.boats-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.boat-card {
    border-radius: 8px;
    border: 1px solid rgb(217, 217, 217);
    background-color: #FFF;
    overflow: hidden;
}

.boat-card-header {
    padding: 15px 7px 10px 7px;
    display: flex;
    justify-content: space-between;
    align-items: start;
    font-family: "Region Bretagne New";
}

.boat-card-header-left {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.boat-card-center-img-text {
    display: flex;
    align-items: center;
    gap: 4px;
}

.boat-card-img-boat {
    width: 17px;
    height: auto;
    object-fit: contain;
    object-position: center;
}

.boat-card-name-boat {
    color: rgb(30, 30, 30);
    font-size: 14px;
    font-weight: 600;
    line-height: 120%;
    letter-spacing: -0.28px;
}

.boat-card-type-boat {
    padding: 4px 8px;
    color: rgb(44, 44, 44);
    font-family: "Open Sans";
    font-size: 11px;
    line-height: 100%;
    background-color: rgb(245, 245, 245);
    border-radius: 120px;
    width: fit-content;
}

.boat-card-tag-direction {
    padding: 2px 10px 2px 2px;
    background-color: rgb(245, 245, 245);
    display: flex;
    align-items: center;
    gap: 4px;
    border-radius: 120px;
}

.boat-card-tag-direction-letter {
    border-radius: 50%;
    color: #000;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
}

.boat-card-tag-direction-text {
    color: #000;
    font-family: "Open Sans";
    font-size: 12px;
    letter-spacing: -0.24px;
    line-height: 90%;
}

.boat-card-body {
    padding: 6px 8px 8px 8px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto;
    gap: 8px 16px;
}


.boat-card-img-title {
    height: 13px;
    width: auto;
    object-fit: contain;
    object-position: center;
}

.boat-card-detail-title {
    color: rgb(117, 117, 117);
    font-size: 13px;
    line-height: 140%;
}

.boat-card-detail-info {
    color: #000;
    font-size: 12px;
    line-height: 140%;
}

/* Utilitaires */
.hidden {
    display: none !important;
}

.loading {
    opacity: 0.6;
    pointer-events: none;
}

.error-message {
    background-color: #fee;
    border-left: 4px solid #f44;
    color: #c00;
    padding: 1rem;
    border-radius: 4px;
    font-size: 0.9rem;
}

/* Responsive - Tablette et desktop */
@media (min-width: 768px) {
    .app-title {
        font-size: 1.75rem;
    }

    .app-header {
        padding: 1.5rem 2rem;
    }

    .header-content {
        max-width: 1200px;
        margin: 0 auto;
        display: flex;
        align-items: center;
        justify-content: center;
        height: 60px;
        width: 100%;
        padding: 0 20px;
        position: relative;
    }

    .header-top {
        margin-bottom: 1.5rem;
        height: 60px;
    }

    .header-logo {
        max-height: 60px;
        max-width: 200px;
    }

    .dropdown-wrapper {
        flex-direction: row;
        align-items: center;
        gap: 1rem;
    }

    .dropdown-label {
        font-size: 1rem;
        min-width: 150px;
    }

    .dropdown-menu {
        max-width: 300px;
    }

    .modal {
        align-items: center;
        justify-content: center;
    }

    .modal-content {
        max-width: 600px;
        max-height: 90vh;
        border-radius: 16px;
    }
}

/* Responsive - Large desktop */
@media (min-width: 1024px) {
    .app-header {
        padding: 2rem;
    }

    .app-title {
        font-size: 2rem;
    }

    .dropdown-menu {
        max-width: 400px;
    }
}


/* ------------------------ home pages ---------------------------------- */




/* ------------------------ END home pages ---------------------------------- */

/* Footer sticky */
.app-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    gap: 14px;
    align-items: stretch;
    justify-content: center;
    padding: 10px;
    background-color: transparent;
    z-index: 1001;
    font-family: "Region Bretagne New";
}

/* Bouton Accueil */
.footer-home {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px;
    gap: 4px;
    border: none;
    border-radius: 9px;
    background: #FFF;
    box-shadow: 0 4px 24px 0 rgba(0, 0, 0, 0.25);
    cursor: pointer;
}

.footer-icon {
    width: 18px;
    height: 18px;
    object-fit: cover;
    transition: filter 0.4s ease;
}

.footer-home.active .footer-icon {
    filter: brightness(0) saturate(100%) invert(51%) sepia(5%) saturate(3243%) hue-rotate(289deg) brightness(83%) contrast(81%);
    transition: filter 0.4s ease;
}

.footer-text {
    color: rgb(117, 117, 117);
    font-size: 12px;
    line-height: 100%;
    font-family: "Region Bretagne New";

}

/* Groupe des dates */
.footer-date-group {
    display: flex;
    gap: 10px;
    align-items: center;
    padding: 10px 20px;
    border-radius: 9px;
    background: #FFF;
    box-shadow: 0 4px 24px 0 rgba(0, 0, 0, 0.25);
}

.footer-date-btn {
    border: none;
    cursor: pointer;
    border: none;
    border-radius: 8px;
    background-color: #F5F5F5;
    padding: 8px;
    color: #757575;
    font-size: 16px;
    line-height: 100%;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: "Region Bretagne New";

}

.footer-date-btn.active {
    color: #F5F5F5;
    background-color: #9E6376;
}

.footer-date-btn:not(.active) img {
    display: none;
}

/* Lock markers and labels styling */
.custom-icon.lock-icon {
    pointer-events: none;
    cursor: default;
}

.lock-label-icon {
    pointer-events: none;
    cursor: default;
}

#lock-label{
    font-family: "Region Bretagne New", sans-serif;
}

/* Responsive destop/tablette */
@media (min-width: 480px) {
    /* TODO */
}