:root {
    --primary-blue: #1d4ed8;
    --white: #ffffff;
    --text-light: #94a3b8;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    height: 100vh;
    overflow: hidden; /* Empêche le scroll global */
}

.main-container {
    display: flex;
    height: 100vh;
}

/* GAUCHE */
.presentation-side {
    flex: 1;
    background-color: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
}

@media (max-width: 900px) { .presentation-side { display: none; } }

.illustration-container {
    text-align: center;
    max-width: 350px;
}

.icon-box {
    width: 100px;
    height: 100px;
    background: white;
    border-radius: 20px;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

.sparkle-icon { width: 50px; color: #cbd5e1; }

.features-grid {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 30px;
}

.feature-card {
    background: white;
    border: 1px solid #e2e8f0;
    padding: 12px;
    border-radius: 12px;
    width: 90px;
    font-size: 8px;
    font-weight: 700;
    color: var(--text-light);
}

/* DROITE */
.form-side {
    flex: 1;
    background-color: var(--primary-blue);
    color: white;
    padding: 40px 60px;
    display: flex;
    flex-direction: column;
}

.form-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 30px;
}

.logo { display: flex; align-items: center; gap: 10px; font-weight: 700; }
.logo-square { width: 25px; height: 25px; background: white; border-radius: 5px; }

/* NOUVEAU : Centrage du titre */
.centered-header {
    text-align: center;
    margin-bottom: 30px;
}

h1 { font-size: 2.2rem; margin-bottom: 5px; }
.subtitle { opacity: 0.8; font-size: 0.95rem; }

/* FORMULAIRE */
.input-row { display: flex; gap: 20px; margin-bottom: 20px; }

.input-group {
    flex: 1;
    border-bottom: 1px solid rgba(255,255,255,0.3);
    padding-bottom: 5px;
}

.input-group label {
    font-size: 9px;
    font-weight: 600;
    opacity: 0.7;
    display: block;
    margin-bottom: 4px;
}

.input-group input {
    background: transparent;
    border: none;
    color: white;
    width: 100%;
    outline: none;
}

/* ZONE DE MESSAGE OPTIMISÉE */
.message-area {
    margin-top: 15px;
    display: flex;
    flex-direction: column;
    flex-grow: 1; /* Prend l'espace disponible */
    min-height: 0; /* Important pour flexbox */
}

.message-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.toolbar { display: flex; gap: 10px; }

.toolbar button {
    background: transparent;
    border: none;
    color: white;
    opacity: 0.6;
    cursor: pointer;
    font-weight: bold;
    padding: 2px 5px;
}

.toolbar button:hover { opacity: 1; }

/* L'éditeur qui remplace le textarea */
.rich-editor {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 12px;
    padding: 15px;
    color: white;
    flex-grow: 1;
    overflow-y: auto;
    outline: none;
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Simulation de placeholder pour div editable */
.rich-editor:empty:before {
    content: attr(data-placeholder);
    color: rgba(255,255,255,0.4);
}

.form-footer {
    margin-top: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.attachment { display: flex; align-items: center; gap: 8px; font-size: 0.85rem; cursor: pointer; }

.actions { display: flex; gap: 10px; }

button.btn-draft, button.btn-send {
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
}

.btn-draft { background: transparent; border: 1px solid rgba(255,255,255,0.3); color: white; }
.btn-send { background: white; border: none; color: var(--primary-blue); display: flex; gap: 8px; }

.btn-send:hover { transform: translateY(-2px); box-shadow: 0 5px 15px rgba(0,0,0,0.1); }