html, body, #cesiumContainer {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

#toolbar {
    position: absolute;
    top: 10px;
    left: 10px;
    bottom: 10px;
    z-index: 100;
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    padding: 15px;
    border-radius: 8px;
    font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
    max-width: 360px;
    overflow-y: auto;
    max-height: calc(100vh - 20px);
}

#toolbar h1 {
    margin: 0 0 10px 0;
    font-size: 16px;
}

#boat-panel {
    position: absolute;
    top: 10px;
    right: 10px;
    bottom: 10px;
    z-index: 95;
    width: 280px;
    max-width: 90vw;
    background: rgba(0, 0, 0, 0.78);
    color: #fff;
    padding: 16px;
    border-radius: 8px;
    font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: calc(100vh - 20px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
    overflow: hidden;
}

#boat-panel h2 {
    margin: 0 0 6px 0;
    font-size: 15px;
    letter-spacing: 0.2px;
}

.boat-panel-meta {
    font-size: 11px;
    opacity: 0.75;
}

#boat-list {
    flex: 1;
    overflow-y: auto;
    padding-right: 4px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.boat-list-empty {
    font-size: 12px;
    opacity: 0.7;
    padding: 12px;
    border: 1px dashed rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    text-align: center;
}

.boat-item {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 6px;
    padding: 10px 12px;
    cursor: pointer;
    transition: background 0.15s ease, border 0.15s ease;
    outline: none;
}

.boat-item:hover,
.boat-item:focus-visible {
    background: rgba(74, 144, 226, 0.35);
    border-color: rgba(74, 144, 226, 0.8);
}

.boat-item.selected {
    background: rgba(74, 144, 226, 0.5);
    border-color: rgba(74, 144, 226, 1);
}

/* Modal des détails du bateau */
#boat-details-modal {
    position: fixed;
    left: 400px;
    top: 50%;
    transform: translateY(-50%) translateX(-120%);
    width: 420px;
    max-width: 90vw;
    max-height: 90vh;
    background: linear-gradient(135deg, rgba(20, 30, 48, 0.98) 0%, rgba(36, 59, 85, 0.98) 100%);
    backdrop-filter: blur(20px);
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.1);
    z-index: 200;
    overflow: hidden;
    transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.27, 1.55), opacity 0.3s ease;
    opacity: 0;
    pointer-events: none;
}

#boat-details-modal.visible {
    transform: translateY(-50%) translateX(0);
    opacity: 1;
    pointer-events: all;
}

.modal-header {
    background: linear-gradient(135deg, rgba(33, 150, 243, 0.3), rgba(21, 101, 192, 0.3));
    padding: 20px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
}

.modal-header h3 {
    margin: 0 0 8px 0;
    font-size: 22px;
    font-weight: 600;
    color: #fff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.modal-header .boat-type {
    font-size: 13px;
    opacity: 0.9;
    color: #b3d9ff;
    font-weight: 500;
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: rgba(255, 59, 48, 0.8);
    transform: rotate(90deg);
}

.modal-body {
    padding: 20px 24px;
    overflow-y: auto;
    max-height: calc(90vh - 200px);
}

.info-grid {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 12px 16px;
    margin-bottom: 24px;
}

.info-label {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.info-value {
    font-size: 14px;
    color: #fff;
    font-weight: 500;
}

.info-value.highlight {
    color: #4fc3f7;
    font-weight: 600;
}

.action-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.action-btn {
    padding: 14px 20px;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #fff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.action-btn.primary {
    background: linear-gradient(135deg, #2196f3, #1976d2);
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.4);
}

.action-btn.primary:hover {
    background: linear-gradient(135deg, #42a5f5, #2196f3);
    box-shadow: 0 6px 16px rgba(33, 150, 243, 0.5);
    transform: translateY(-2px);
}

.action-btn.secondary {
    background: linear-gradient(135deg, #66bb6a, #43a047);
    box-shadow: 0 4px 12px rgba(102, 187, 106, 0.4);
}

.action-btn.secondary:hover {
    background: linear-gradient(135deg, #81c784, #66bb6a);
    box-shadow: 0 6px 16px rgba(102, 187, 106, 0.5);
    transform: translateY(-2px);
}

.action-btn:active {
    transform: translateY(0);
}

.info-section {
    margin-bottom: 20px;
}

.info-section-title {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
    font-weight: 600;
}

.boat-item-name {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.boat-item-meta {
    font-size: 11px;
    opacity: 0.75;
    line-height: 1.3;
}

#status {
    font-size: 12px;
    opacity: 0.85;
    margin-bottom: 10px;
}

button {
    padding: 8px 12px;
    font-size: 12px;
    cursor: pointer;
    border: none;
    border-radius: 4px;
    background: #4a90e2;
    color: white;
    font-weight: 500;
    margin-right: 5px;
    margin-bottom: 5px;
}

button:hover {
    background: #357abd;
}

.model-item {
    padding: 6px 10px;
    border-bottom: 1px solid #444;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
}

.load-btn {
    padding: 4px 10px;
    font-size: 11px;
    background: #0078d4;
}

#boat-type-scale-list {
    max-height: 220px;
    overflow-y: auto;
    padding-right: 4px;
}

.boat-type-scale-item {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 5px;
    padding: 8px 10px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 12px;
}

.boat-type-scale-header {
    font-weight: 600;
    letter-spacing: 0.3px;
}

.boat-type-scale-meta {
    opacity: 0.7;
    font-size: 11px;
}

.boat-type-scale-slider-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.boat-type-scale-slider-row input[type="range"] {
    flex: 1;
}

.boat-type-scale-value {
    min-width: 48px;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

#weather-widget {
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 10px 12px;
    margin: 12px 0;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
}

#weather-widget img {
    width: 48px;
    height: 48px;
}

#weather-widget .weather-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

#weather-summary {
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.2px;
}

#weather-meta {
    font-size: 11px;
    opacity: 0.75;
    line-height: 1.3;
}