/* Charte graphique - Police institutionnelle */
@import url("https://fonts.googleapis.com/css2?family=Raleway:wght@400;500;600;700&display=swap");

/* Bootstrap 5 est chargé via CDN dans templates/base.html.twig */
/* Raleway est appliquée globalement et hérité par tous les éléments */

body {
    background-color: white;
    font-family: "Raleway", sans-serif;
    font-size: smaller;
}

/* Customisations et extensions Bootstrap */
/* À compléter selon les besoins du design et des dataviz */

main {
    padding: 60px 15px 0;
}

main > .container {
    padding: 10px 15px 0;
}

main > .container-fluid {
    padding: 10px 15px 0;
}

li.breadcrumb-item > a {
    color: black;
    text-decoration: none;
    font-weight: bold;
}

.navbar-logo {
    height: 20px;
}

/* Home page - domain list */
.domain-list .list-group-item {
    border-left: none;
    border-right: none;
    padding: 0.6rem 1rem;
}

/* Map labels */
.domain-map-label {
    background: none;
    border: none;
    box-shadow: none;
    font-family: "Raleway", sans-serif;
    font-size: 0.75rem;
    font-weight: 600;
    color: #333;
}

.domain-map-label::before {
    display: none;
}

/* Domain map page - legend */
.parcel-legend {
    min-width: 180px;
    padding: 0.5rem 0;
}

.legend-item {
    position: relative;
    width: 100%;
    min-height: 24px;
}

.legend-color {
    display: inline-block;
    width: 30px;
    height: 20px;
}

.legend-color:last-child {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
}

.legend-item span:not(.legend-color) {
    display: inline-block;
    max-width: calc(100% - 70px);
    overflow: visible;
    white-space: normal;
    text-overflow: ellipsis;
    margin-right: 40px;
    line-height: 20px;
}

.legend-separator {
    border-top: 1px solid #ccc;
}

.legend-info-icon {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.75rem;
    cursor: help;
    opacity: 0.6;
}

.legend-info-icon:hover {
    opacity: 1;
}

/* Leaflet custom controls — unified style matching native zoom buttons */
.leaflet-control-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    font-size: 14px;
    color: #333;
    text-decoration: none;
}

.leaflet-control-button:hover {
    background-color: #f4f4f4;
    color: #333;
    text-decoration: none;
}

/* Cluster zoom control */
.leaflet-control-clusters {
    position: relative;
}

.leaflet-cluster-dropdown {
    position: absolute;
    top: 0;
    left: 100%;
    margin-left: 5px;
    background: white;
    border-radius: 2px;
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.4);
    max-height: 300px;
    overflow-y: auto;
    min-width: 160px;
    z-index: 1000;
}

.leaflet-cluster-item {
    display: block;
    width: 100%;
    padding: 5px 10px;
    color: #333;
    text-decoration: none;
    font-family: "Raleway", sans-serif;
    font-size: 0.8rem;
    white-space: nowrap;
    border-bottom: 1px solid #f0f0f0;
}

.leaflet-cluster-item:last-child {
    border-bottom: none;
}

.leaflet-cluster-item:hover {
    background-color: #f4f4f4;
    color: #333;
    text-decoration: none;
}

.leaflet-cluster-item-active {
    background-color: #e2e6ea;
    font-weight: 600;
}

/* Documentation page */
.doc-container {
    max-width: 800px;
}

.doc-container h6 {
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.doc-container ul, .doc-container ol {
    margin-bottom: 1rem;
}

/* Calendar legend styles - same as parcel legend */
.calendar-legend {
    min-width: 180px;
    padding: 0.5rem 0;
}

.legend-family {
    margin-bottom: 1rem;
}

.legend-family-title {
    font-weight: bold;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.calendar-legend .legend-item {
    position: relative;
    width: 100%;
    min-height: 24px;
}

.calendar-legend .legend-color {
    display: inline-block;
    width: 30px;
    height: 20px;
}

.calendar-legend .legend-color:last-child {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
}

.calendar-legend .legend-item span:not(.legend-color) {
    display: inline-block;
    max-width: calc(100% - 70px);
    overflow: visible;
    white-space: normal;
    text-overflow: ellipsis;
    margin-right: 40px;
    line-height: 20px;
}

.legend-reserved {
    display: inline-block;
    width: 160px;
    height: 28px;
    border: 2.5px solid #e67e00;
    background: #fff;
    text-align: center;
    line-height: 24px;
    font-size: 0.75rem;
}

/* Conflict legend items */
.legend-conflict {
    display: inline-block;
    width: 160px;
    height: 28px;
    background: #fff;
    text-align: center;
    line-height: 24px;
    font-size: 0.75rem;
}

.legend-conflict-current {
    border: 3px dashed #000;
}

.legend-conflict-future {
    border: 3px dotted #000;
}

/* Parcel labels */
.parcel-label {
    background: none;
    border: none;
    box-shadow: none;
    font-family: "Raleway", sans-serif;
    font-size: 0.7rem;
    font-weight: 600;
    color: #333;
}

.parcel-label::before {
    display: none;
}

/* Datetime navigation bar */
.datetime-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.5rem 0;
}

.datetime-nav input[type="datetime-local"] {
    width: 220px;
}

.datetime-nav .btn {
    min-width: 36px;
    font-weight: bold;
}