/* --- STYLES DE BASE --- */
body {
    background-color: #0a0f1e;
    color: #f8fafc;
    font-family: 'Segoe UI', sans-serif;
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

#main-header {
    width: 100%;
    padding: 15px 0;
    text-align: center;
    background: rgba(30, 41, 59, 0.5);
    border-bottom: 1px solid #1e293b;
}

#main-header h1 {
    margin: 0;
    font-size: 1.2rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #38bdf8;
}

#main-container {
    display: flex;
    flex: 1;
}

#left-panel, #info-zone {
    width: 20%;
    padding: 20px;
    box-sizing: border-box;
    background: rgba(255,255,255,0.02);
    border-right: 1px solid #1e293b;
}

#info-zone { border-right: none; border-left: 1px solid #1e293b; }

#builder-zone {
    width: 60%;
    background: #050505;
    position: relative;
}

canvas { width: 100%; height: 100%; display: block; cursor: crosshair; }

/* Éléments de contrôle */
.control-group h3 { color: #38bdf8; font-size: 0.9rem; margin-bottom: 20px; }
#phSliderContainer { margin-bottom: 20px; }
#freqSlider { width: 100%; cursor: pointer; }
#phScale { display: flex; justify-content: space-between; font-size: 0.75rem; color: #94a3b8; margin-top: 10px; }

.instruction-box {
    font-size: 0.85rem; color: #94a3b8; line-height: 1.6; padding: 15px; 
    background: rgba(15, 23, 42, 0.5); border-radius: 8px; border: 1px solid #1e293b;
}

.data-card {
    width: 100%; background: rgba(30, 41, 59, 0.5);
    padding: 15px; border-radius: 8px; margin-bottom: 15px;
    text-align: center; border: 1px solid #1e293b; box-sizing: border-box;
}

.data-card .label { font-size: 0.8rem; color: #94a3b8; display: block; margin-bottom: 5px; font-weight: bold; }
.data-card .value { font-size: 1.3rem; font-weight: bold; font-family: monospace; }
.highlight { border-color: #38bdf8; background: rgba(56, 189, 248, 0.1); }
.highlight .value { color: #38bdf8; }

.usage-btn {
    background: linear-gradient(135deg, #38bdf8, #1e40af);
    color: white; border: none; padding: 12px; border-radius: 8px;
    cursor: pointer; font-size: 13px; font-weight: bold; width: 100%; margin-top: 10px;
}

/* Modal */
.modal { display: none; position: fixed; z-index: 1000; left: 0; top: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.8); backdrop-filter: blur(5px); }
.modal-content { background: #0f172a; margin: 5% auto; padding: 20px; border: 1px solid #38bdf8; border-radius: 12px; width: 80%; max-width: 800px; color: white; }
.close-btn { float: right; cursor: pointer; font-size: 24px; }
#usageTable { width: 100%; border-collapse: collapse; margin-top: 20px; }
#usageTable th, #usageTable td { padding: 8px; border-bottom: 1px solid #1e293b; text-align: left; font-size: 0.8rem; }