/* ================= GLOBAL ================= */

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    height: 100vh;
    background: linear-gradient(135deg, #0f2027, #203a43, #2c5364);
    font-family: 'Segoe UI', sans-serif;
    color: #ffffff;
    overflow: hidden;
}

/* ================= CONTAINER ================= */

.container {
    height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ================= TABS ================= */

.tabs {
    display: flex;
    padding: 10px;
    gap: 10px;
}

/* HEADER button */
.tabs button:first-child {
    flex: 1;
    padding: 12px;
    background: linear-gradient(45deg, #e53935, #c62828);
    border: none;
    color: white;
    font-weight: bold;
    font-size: 15px;
    cursor: pointer;
    border-radius: 10px;
    transition: 0.3s ease;
}

/* BODY button */
.tabs button:last-child {
    flex: 1;
    padding: 12px;
    background: linear-gradient(45deg, #43a047, #2e7d32);
    border: none;
    color: white;
    font-weight: bold;
    font-size: 15px;
    cursor: pointer;
    border-radius: 10px;
    transition: 0.3s ease;
}

.tabs button:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 20px rgba(0,0,0,0.4);
}

/* ================= TAB CONTENT ================= */

.tab {
    flex: 1;
    display: none;
    padding: 20px;
    height: calc(100vh - 80px); /* force hauteur réelle */
}

.tab.active {
    display: block;
}


/* ================= LAYOUT ================= */


.layout {
    display: flex;
    width: 100%;
    height: calc(100vh - 100px);
    gap: 20px;
}

/* ================= TEXTAREAS ================= */

textarea {
    flex: 1;
    height: 100%;
    resize: none;
    background: #ffffff;
    color: #111111;
    border: 2px solid #2c5364;
    padding: 18px;
    font-family: "JetBrains Mono", monospace;
    font-size: 14px;
    border-radius: 12px;
    outline: none;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

textarea:focus {
    border-color: #00ffcc;
    box-shadow: 0 0 15px rgba(0,255,204,0.4);
}

/* ================= CENTER PANEL ================= */

/* CENTER PANEL FIXED WIDTH */
.center-panel {
    width: 280px;
    min-width: 280px;
    max-width: 280px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: #141414;
    padding: 15px;
    border-radius: 8px;
}
/* ================= BUTTON ================= */

button {
    padding: 8px;
    background: linear-gradient(45deg, #2c5364, #203a43);
    border: none;
    color: white;
    font-weight: bold;
    font-size: 13px;
    cursor: pointer;
    transition: 0.3s;
    border-radius: 6px;
}

button:hover {
    background: linear-gradient(45deg, #00ffcc, #00ccaa);
    color: #111;
    transform: scale(1.03);
}

/* ================= INPUT ================= */

input {
    padding: 8px;
    background: #1e1e1e;
    border: 1px solid #333;
    color: white;
    font-size: 13px;
    border-radius: 6px;
    outline: none;
}

input:focus {
    border-color: #00ffcc;
    box-shadow: 0 0 8px #00ffcc33;
}

/* ================= BODY PREVIEW ================= */

#body_editor {
    width: 100%;
    height: 100%;
}

#body_preview {
    border: 2px solid #2c5364;
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

/* ================= SCROLLBAR ================= */

textarea::-webkit-scrollbar {
    width: 8px;
}

textarea::-webkit-scrollbar-thumb {
    background: #2c5364;
    border-radius: 4px;
}

textarea::-webkit-scrollbar-thumb:hover {
    background: #00ffcc;
}
#body_editor,
#header_input,
#header_output,
#body_preview {
    flex: 1;
    height: 100%;
    width: 100%;
}