/**
 * TEST SIMULATOR - Styles
 * Mise en page épurée Roboto Mono
 */

/* =============================================
   PANNEAU DE CONFIGURATION
   ============================================= */

#test-panel {
    font-family: 'Roboto Mono', monospace;
    font-weight: 300;
}

.test-panel-content {
    padding: 10px;
}

.test-panel-content h3 {
    font-size: 14px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #333;
    margin: 0 0 15px 0;
    padding-bottom: 10px;
    border-bottom: 1px solid #e0e0e0;
}

.test-section {
    background: #f8f8f8;
    border-radius: 6px;
    padding: 12px;
    margin-bottom: 12px;
}

.test-section h4 {
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #555;
    margin: 0 0 10px 0;
}

.test-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
    gap: 10px;
}

.test-row label {
    font-size: 11px;
    color: #666;
    flex-shrink: 0;
}

.test-row select,
.test-row input[type="number"] {
    font-family: 'Roboto Mono', monospace;
    font-size: 11px;
    padding: 6px 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
    flex: 1;
    max-width: 120px;
}

.test-row input[type="checkbox"] {
    margin-right: 6px;
}

/* Sliders de direction vent */
.wind-dir-input,
.duration-input,
.wind-speed-input {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
}

.wind-dir-input input[type="range"],
.duration-input input[type="range"],
.wind-speed-input input[type="range"] {
    flex: 1;
    height: 4px;
    -webkit-appearance: none;
    background: #ddd;
    border-radius: 2px;
}

.wind-dir-input input[type="range"]::-webkit-slider-thumb,
.duration-input input[type="range"]::-webkit-slider-thumb,
.wind-speed-input input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 14px;
    height: 14px;
    background: #3498db;
    border-radius: 50%;
    cursor: pointer;
}

.wind-dir-input span,
.duration-input span,
.wind-speed-input span {
    font-size: 10px;
    color: #333;
    min-width: 50px;
    text-align: right;
}

/* Boutons */
.test-btn {
    font-family: 'Roboto Mono', monospace;
    font-size: 11px;
    font-weight: 400;
    padding: 8px 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    margin-top: 8px;
}

.test-btn.primary {
    background: #3498db;
    color: white;
}

.test-btn.primary:hover {
    background: #2980b9;
}

.test-btn.primary:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
}

.test-btn.secondary {
    background: #ecf0f1;
    color: #555;
}

.test-btn.secondary:hover {
    background: #dfe6e9;
}

.test-btn.large {
    padding: 12px;
    font-size: 12px;
    font-weight: 500;
}

/* Infos points */
.test-info {
    background: white;
    border-radius: 4px;
    padding: 10px;
}

.test-point-info {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
    font-size: 10px;
    color: #666;
}

.point-marker {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    font-size: 12px;
}

.point-marker.start {
    background: #27ae60;
    color: white;
}

.point-marker.end {
    background: #e74c3c;
    color: white;
}

.test-distance {
    font-size: 11px;
    font-weight: 500;
    color: #333;
    padding-top: 8px;
    border-top: 1px solid #eee;
    margin-top: 8px;
}

/* =============================================
   MARQUEURS SUR LA CARTE
   ============================================= */

.test-marker {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    text-shadow: 0 0 3px rgba(0,0,0,0.5);
}

.start-marker {
    color: #27ae60;
}

.end-marker {
    color: #e74c3c;
}

.maneuver-marker {
    font-size: 18px;
    text-shadow: 0 0 3px white;
}

.boat-marker {
    font-size: 24px;
    text-shadow: 0 0 5px rgba(0,0,0,0.3);
}

/* Labels de vent */
.wind-label {
    background: transparent;
}

.wind-info {
    background: rgba(255,255,255,0.9);
    padding: 4px 8px;
    border-radius: 4px;
    font-family: 'Roboto Mono', monospace;
    font-size: 10px;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
    color: #333;
}

/* =============================================
   PANNEAU DE RÉSULTATS
   ============================================= */

.test-results-panel {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 380px;
    max-height: 500px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    z-index: 1000;
    font-family: 'Roboto Mono', monospace;
    overflow: hidden;
}

.test-results-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 15px;
    background: #f8f8f8;
    border-bottom: 1px solid #e0e0e0;
}

.test-results-header h3 {
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0;
    color: #333;
}

.test-close-btn {
    background: none;
    border: none;
    font-size: 16px;
    color: #999;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.test-close-btn:hover {
    color: #333;
}

.test-results-content {
    padding: 15px;
    max-height: 420px;
    overflow-y: auto;
}

/* Cartes de résumé */
.test-results-summary {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 15px;
}

.result-card {
    background: #f8f8f8;
    border-radius: 6px;
    padding: 12px 10px;
    text-align: center;
}

.result-card .result-label {
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #888;
    margin-bottom: 6px;
}

.result-card .result-value {
    font-size: 16px;
    font-weight: 500;
    color: #333;
}

.result-card.optimal {
    background: #e8f5e9;
}

.result-card.optimal .result-value {
    color: #27ae60;
}

.result-card.direct {
    background: #f5f5f5;
}

.result-card.gain {
    background: #e3f2fd;
}

.result-card.gain .result-value.positive {
    color: #27ae60;
}

.result-card.gain .result-value.negative {
    color: #e74c3c;
}

/* Détails manœuvres */
.test-results-details {
    margin-bottom: 15px;
}

.test-results-details h4 {
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #555;
    margin: 0 0 10px 0;
}

.maneuvers-list {
    background: #f8f8f8;
    border-radius: 6px;
    padding: 10px;
}

.maneuver-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    border-bottom: 1px solid #eee;
    font-size: 11px;
}

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

.maneuver-type {
    color: #333;
}

.maneuver-time {
    color: #888;
    font-size: 10px;
}

.no-maneuvers {
    color: #999;
    font-size: 11px;
    font-style: italic;
}

/* Timeline */
.test-timeline {
    margin-bottom: 15px;
}

.test-timeline h4 {
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #555;
    margin: 0 0 10px 0;
}

.timeline-chart {
    background: #f8f8f8;
    border-radius: 6px;
    padding: 10px;
    height: 120px;
}

#timeline-canvas {
    width: 100%;
    height: 100%;
}

/* Contrôles d'animation */
.test-animation-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px;
    background: #f8f8f8;
    border-radius: 6px;
}

.test-animation-controls .test-btn {
    width: auto;
    padding: 6px 10px;
    margin: 0;
    font-size: 12px;
}

.test-animation-controls input[type="range"] {
    flex: 1;
    height: 4px;
    -webkit-appearance: none;
    background: #ddd;
    border-radius: 2px;
}

.test-animation-controls input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 12px;
    height: 12px;
    background: #3498db;
    border-radius: 50%;
    cursor: pointer;
}

#test-anim-time {
    font-size: 11px;
    color: #666;
    min-width: 45px;
    text-align: right;
}

/* =============================================
   MENU ITEM
   ============================================= */

#menu-test {
    cursor: pointer;
}

#menu-test:hover,
#menu-test.active {
    background: rgba(52, 152, 219, 0.1);
}

#menu-test.active {
    border-left: 3px solid #3498db;
}

/* =============================================
   RESPONSIVE
   ============================================= */

@media (max-width: 768px) {
    .test-results-panel {
        width: calc(100% - 40px);
        left: 20px;
        right: 20px;
        bottom: 70px;
    }

    .test-results-summary {
        grid-template-columns: 1fr;
    }
}

/* =============================================
   IMPRESSION
   ============================================= */

@media print {
    .test-results-panel,
    #test-panel {
        display: none !important;
    }
}

