:root {
    --bg-color: #f4f4f9;
    --text-color: #333;
    --primary: #f39c12;
    --primary-dark: #000000;
    --editor-bg: #fff;
    --border-color: #ddd;
}

body{
    background-color: var(--bg-color);
}

main {
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    
    color: var(--text-color);
    margin: 0;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

h1 {
    color: var(--primary-dark);
    text-align: center;
}

.container {
    width: 100%;
    max-width: 900px;
    background: var(--editor-bg);
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    padding: 20px;
    box-sizing: border-box;
}

.meta-inputs {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

.meta-inputs input, .meta-inputs textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-family: inherit;
    box-sizing: border-box;
}

/* --- BARRE D'OUTILS --- */
.toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    padding: 10px;
    background: #eee;
    border: 1px solid var(--border-color);
    border-bottom: none;
    border-radius: 4px 4px 0 0;
}

.toolbar button {
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 8px 12px;
    cursor: pointer;
    color: #333;
    transition: background 0.2s;
}

.toolbar button:hover {
    background: #e0e0e0;
}

.toolbar button.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary-dark);
}

.toolbar input[type="file"] {
    display: none;
}

/* --- ZONE D'ÉDITION --- */
.editor-area {
    min-height: 400px;
    padding: 20px;
    border: 1px solid var(--border-color);
    border-radius: 0 0 4px 4px;
    background: #fff;
    outline: none;
    line-height: 1.6;
}

.editor-area:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(243, 156, 18, 0.2);
}

/* --- BOUTON D'EXPORT --- */
.export-btn {
    display: block;
    width: 100%;
    padding: 15px;
    margin-top: 20px;
    background: #27ae60;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s;
}

.export-btn:hover {
    background: #219653;
}
.export-btn:disabled {
    background: #95a5a6;
    cursor: not-allowed;
}

/* Loader */
#loader {
    display: none;
    text-align: center;
    color: #27ae60;
    margin-top: 10px;
    font-weight: bold;
}

.editor-area:empty::before {
    content: attr(data-placeholder);
    color: #989898;
    font-style: italic;
    pointer-events: none;
}