@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
    --primary: #6257e8;
    --primary-hover: #5146d3;
    --background: #f6f7fb;
    --surface: #ffffff;
    --text: #202338;
    --muted: #777d91;
    --border: #e7e9f0;
    --radius: 12px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Inter', sans-serif;
    background: var(--background);
    color: var(--text);
}

.app-header {
    height: 72px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 6%;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 700;
    font-size: 19px;
}

.logo-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: var(--primary);
    color: white;
    display: grid;
    place-items: center;
}

.header-user {
    color: var(--muted);
    font-size: 13px;
}

.main-container {
    max-width: 1100px;
    margin: 45px auto;
    padding: 0 24px;
}

.page-heading {
    margin-bottom: 40px;
}

.page-heading h1 {
    font-size: 28px;
    margin-bottom: 10px;
}

.page-heading p,
.section-heading p {
    color: var(--muted);
    line-height: 1.6;
}

.planning-section,
.documents-section {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    margin-bottom: 30px;
}

.section-heading {
    margin-bottom: 25px;
}

.section-heading h2 {
    font-size: 19px;
}

.input-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.input-card {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 25px;
    text-align: center;
}

.input-icon {
    font-size: 30px;
}

.input-card h3 {
    font-size: 16px;
}

.input-card p {
    color: var(--muted);
    font-size: 13px;
}

.planning-editor {
    margin-top: 28px;
}

.planning-editor label {
    display: block;
    font-weight: 600;
    margin-bottom: 12px;
}

textarea {
    width: 100%;
    min-height: 220px;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font: inherit;
    resize: vertical;
    outline: none;
}

textarea:focus {
    border-color: var(--primary);
}

.editor-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    margin-top: 15px;
}

.editor-footer span {
    color: var(--muted);
    font-size: 12px;
}

button {
    border: none;
    border-radius: 8px;
    padding: 12px 18px;
    font-weight: 600;
    cursor: pointer;
}

.primary-button {
    background: var(--primary);
    color: white;
}

.primary-button:hover {
    background: var(--primary-hover);
}

.secondary-button {
    background: #f0efff;
    color: var(--primary);
}

#image-preview img {
    max-width: 100%;
    max-height: 180px;
    margin-top: 15px;
    border-radius: 8px;
}

[hidden] {
    display: none !important;
}

@media (max-width: 700px) {
    .input-options {
        grid-template-columns: 1fr;
    }

    .editor-footer {
        align-items: stretch;
        flex-direction: column;
    }

    .app-header {
        padding: 0 20px;
    }

    .planning-section {
        padding: 18px;
    }
}
/* DOCUMENTS */

.documents-section {
    scroll-margin-top: 25px;
}

.document-card {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 20px;
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.document-card:hover {
    border-color: #cbc7fa;
    box-shadow: 0 4px 15px rgba(40, 40, 80, 0.04);
}

.document-category {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 20px;
    background: #f0efff;
    color: var(--primary);
    font-size: 11px;
    font-weight: 600;
    margin-bottom: 12px;
}

.document-card h3 {
    font-size: 18px;
    margin: 0 0 8px;
}

.document-description {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.6;
    margin-bottom: 22px;
}

.document-card label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 10px;
}

.document-prompt {
    width: 100%;
    min-height: 180px;
    padding: 15px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-family: inherit;
    font-size: 13px;
    line-height: 1.6;
    resize: vertical;
    outline: none;
    background: #fafaff;
}

.document-prompt:focus {
    border-color: var(--primary);
    background: #fff;
}

.document-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    margin-top: 18px;
}

.document-status {
    font-size: 12px;
    font-weight: 600;
    padding: 7px 11px;
    border-radius: 20px;
}

.status-pending {
    color: #777d91;
    background: #f0f1f5;
}

.status-generating {
    color: #946200;
    background: #fff4d8;
}

.status-completed {
    color: #16834a;
    background: #e5f7ed;
}

.generate-button:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

.generation-notice {
    margin: 18px 0 0;
    padding: 12px 15px;
    border-radius: 8px;
    background: #f0f9f3;
    color: #287348;
    font-size: 12px;
    line-height: 1.5;
}

@media (max-width: 700px) {
    .document-footer {
        align-items: stretch;
        flex-direction: column;
    }

    .document-footer button {
        width: 100%;
    }

    .document-card {
        padding: 18px;
    }
}
/* CONFIGURATION DE LA CLASSE */

.class-section {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    margin-bottom: 30px;
}

.class-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.form-group > label {
    font-size: 13px;
    font-weight: 600;
}

.form-group select,
.form-group input[type="number"],
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font: inherit;
    font-size: 13px;
    background: white;
}

.level-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.level-options label {
    padding: 10px 14px;
    background: #f6f7fb;
    border: 1px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
}

.level-options input {
    accent-color: var(--primary);
}

.form-group small {
    color: var(--muted);
    font-size: 11px;
}

@media (max-width: 700px) {
    .class-form {
        grid-template-columns: 1fr;
    }
}