/* Tablet and down: turn the two-column editorial sections into stacked reading blocks. */
@media (max-width: 1024px) {
    .edition-content {
        height: auto;
        min-height: 100vh;
        padding: 1.5rem 1rem 2rem;
    }

    .edition-content h1 {
        margin: 0.5rem 0 1.5rem;
        font-size: clamp(2.2rem, 5vw, 3.3rem);
    }

    .edition-content .edition-image {
        flex-direction: column;
        align-items: center;
        height: auto;
        gap: 1.5rem;
    }

    .edition-content .edition-flex,
    .edition-content .auteur {
        width: min(100%, 52rem);
        margin: 0;
        padding: 1.25rem 1rem;
        box-sizing: border-box;
    }

    .edition-content .edition-flex h2,
    .edition-content .auteur h2 {
        font-size: clamp(1.4rem, 3vw, 1.8rem);
    }

    .edition-content .img-lec {
        width: min(100%, 22rem);
        height: auto;
        max-height: 360px;
    }

    .edition-content .img-edit {
        width: min(100%, 40rem) !important;
        height: auto !important;
        max-height: 420px;
    }

    .edition-content .edit-btn {
        width: min(100%, 22rem);
        margin-left: auto;
        margin-right: auto;
    }
}

/* Phone: simplify spacing, keep images fluid, and make the submission form easier to scan. */
@media (max-width: 767px) {
    .edition-content {
        padding: 1rem 0.75rem 1.5rem;
    }

    .edition-content a.fragment-link {
        align-self: stretch;
    }

    .edition-content .nice-btn {
        margin-left: 0;
        width: min(100%, 18rem);
        align-self: flex-start;
    }

    .edition-content h1 {
        font-size: clamp(1.8rem, 8vw, 2.5rem);
        margin-bottom: 1rem;
    }

    .edition-content p {
        font-size: 1rem;
    }

    .edition-content .edition-image {
        gap: 1rem;
    }

    .edition-content .edition-flex,
    .edition-content .auteur {
        padding: 1rem 0.75rem;
    }

    .edition-content .edition-flex h2,
    .edition-content .auteur h2 {
        font-size: clamp(1.2rem, 5vw, 1.55rem);
    }

    .edition-content .img-lec,
    .edition-content .img-edit {
        width: min(100%, 18rem) !important;
        max-height: none;
        margin-top: 1rem;
        margin-bottom: 1rem;
    }

    .edition-content .author-submission-form {
        margin-top: 1rem;
    }

    .edition-content .author-submission-grid {
        gap: 0.85rem;
        margin-bottom: 1rem;
    }

    .edition-content .author-submission-field label,
    .edition-content .author-submission-field small {
        text-align: left;
    }

    .edition-content .author-submission-field input {
        padding: 0.8rem 0.9rem;
    }

    .edition-content .edit-btn {
        padding: 0.85rem 1rem;
        font-size: 0.95rem;
    }
}

/* Small phones: reduce outer spacing once more to avoid crowding. */
@media (max-width: 479px) {
    .edition-content {
        padding-left: 0.6rem;
        padding-right: 0.6rem;
    }

    .edition-content .nice-btn,
    .edition-content .edit-btn {
        width: 100%;
    }

    .edition-content .edition-flex,
    .edition-content .auteur {
        padding-left: 0.65rem;
        padding-right: 0.65rem;
    }
}
