* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    background: #1a1a1a;
    color: #e0e0e0;
    min-height: 100vh;
}

/* Onglets */
.tabs {
    background: #2d2d2d;
    border-bottom: 2px solid #404040;
    display: flex;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.tab {
    padding: 15px 30px;
    cursor: pointer;
    border: none;
    background: none;
    font-size: 16px;
    color: #b0b0b0;
    border-bottom: 3px solid transparent;
    transition: all 0.3s;
}

.tab:hover {
    background: #3a3a3a;
    color: #fff;
}

.tab.active {
    border-bottom-color: #00d4aa;
    color: #00d4aa;
    font-weight: bold;
    background: #333;
}

/* Pages */
.page {
    display: none;
    padding: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.page.active {
    display: block;
}

.page h1 {
    margin-bottom: 20px;
    color: #fff;
    font-size: 2rem;
}

.page p {
    color: #ccc;
    line-height: 1.6;
    margin-bottom: 20px;
}

/* Bloc code */
.code-box {
    background: #0d1117;
    color: #c9d1d9;
    padding: 20px;
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    margin: 20px 0;
    overflow-x: auto;
    border: 1px solid #30363d;
    box-shadow: 0 4px 15px rgba(0,0,0,0.4);
}

/* Convertisseur */
.converter {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 20px 0;
    flex-wrap: wrap;
}
.custom-select {
    position: relative;
    min-width: 180px;
}

.custom-select input {
    width: 100%;
    cursor: pointer;
}

.dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #222;
    border: 1px solid #3b3b3b;
    border-top: none;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
}

.dropdown-item {
    padding: 10px 12px;
    cursor: pointer;
    border-bottom: 1px solid #2e2e2e;
    color: #e0e0e0;
}

.dropdown-item:hover {
    background: #333;
    color: #00d4aa;
}

.dropdown-item.selected {
    background: #00d4aa;
    color: #0e1514;
}
/* Inputs / selects / boutons */
input, select, button {
    padding: 10px 12px;
    border: 1px solid #3b3b3b;
    border-radius: 6px;
    font-size: 16px;
    background: #222;
    color: #e0e0e0;
    outline: none;
    transition: border-color .2s, box-shadow .2s, background .2s, color .2s;
}

input[type="number"] {
    width: 120px;
    -moz-appearance: textfield;
}
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

select {
    min-width: 180px;
}

input:focus, select:focus {
    border-color: #00d4aa;
    box-shadow: 0 0 0 3px rgba(0,212,170,0.15);
}

/* Bouton principal */
button {
    background: #00d4aa;
    color: #0e1514;
    font-weight: 700;
    border: none;
    cursor: pointer;
}
button:hover {
    background: #00b993;
}
button:active {
    transform: translateY(1px);
}
button:disabled {
    opacity: .6;
    cursor: not-allowed;
}

/* Résultat */
#result {
    font-size: 18px;
    font-weight: 800;
    color: #00d4aa;
    background: #0f1f1d;
    padding: 10px 14px;
    border-radius: 999px;
    border: 1px solid #124a41;
    min-width: 110px;
    text-align: center;
}

/* Liste des unités */
#unitsList {
    list-style: none;
    margin-top: 10px;
}
#unitsList li {
    padding: 8px 10px;
    background: #222;
    border: 1px solid #2e2e2e;
    border-radius: 6px;
    margin-bottom: 8px;
    color: #cfcfcf;
}
#unitsList li:hover {
    border-color: #00d4aa33;
}

/* Loading */
.loading {
    color: #a0a0a0;
    font-style: italic;
}

/* Responsive */
@media (max-width: 600px) {
    .tab {
        padding: 12px 16px;
        font-size: 14px;
    }
    .page {
        padding: 20px;
    }
    select {
        min-width: 140px;
    }
}