/* Administration — papier, encre et bleu du journal. */
.admin-body {
    min-height: 100vh;
    background: #f5f5f0;
    font-size: 15px;
}
.admin-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 24px;
    padding: 24px max(28px, calc((100vw - 1280px) / 2));
    background: white;
    border-bottom: 1px solid #deded6;
}
.admin-brand {
    font-family: var(--display);
    font-weight: 900;
    font-size: 25px;
    letter-spacing: -.8px;
    line-height: 1.1;
}
.admin-brand > span:first-child {
    color: var(--blue);
}
.admin-brand-note {
    display: block;
    margin-top: 7px;
    font-family: var(--body);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: .22em;
    color: var(--muted);
}
.admin-header nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    font-size: 13px;
}
.admin-header form {
    margin: 0;
}
.admin-view-site {
    order: 3;
    margin-left: 14px;
    color: var(--muted);
}
.admin-nav-item {
    padding: 10px 14px;
    border-radius: 7px;
    font-weight: 700;
    color: var(--muted);
}
.admin-nav-item[aria-current], .admin-nav-item:hover {
    background: #edf0ff;
    color: var(--blue);
}
.admin-account {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: 20px;
    padding-left: 24px;
    border-left: 1px solid var(--line);
    font-weight: 700;
}
.admin-account small {
    display: block;
    font-size: 11px;
    font-weight: 400;
    color: var(--muted);
}
.admin-avatar {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #e9edff;
    color: var(--blue);
    overflow: hidden;
    flex-shrink: 0;
}
.admin-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.admin-account:hover .admin-avatar {
    outline: 2px solid var(--blue);
    outline-offset: 3px;
}
.admin-profile-panel {
    min-width: 0;
}
.admin-profile-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(420px, 100%), 1fr));
    align-items: start;
    gap: 28px;
}
.admin-profile-panel .admin-primary {
    width: 100%;
    margin-top: 16px;
}
.admin-profile-panel input[type=file]::file-selector-button {
    margin-right: 12px;
    padding: 9px 12px;
    border: 0;
    border-radius: 5px;
    background: #edf0ff;
    color: #193df4;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}
.admin-user-form {
    max-width: 640px;
    margin-bottom: 36px;
}
.admin-user-form h2 {
    font-size: 24px;
}
.admin-user-fields {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr));
    gap: 0 20px;
}
.admin-user-card {
    overflow-wrap: anywhere;
}
.admin-user-card h3 {
    font-size: 20px;
    line-height: 1.3;
}
.admin-user-card-actions {
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid #eceee7;
}
.admin-delete-account-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-height: 44px;
    padding: 11px 15px;
    border: 1px solid #edb5b5;
    border-radius: 8px;
    background: #fff0ef;
    color: #9b2020;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.5;
    text-decoration: none;
}
.admin-delete-account-button:hover {
    background: #9b2020;
    border-color: #9b2020;
    color: white;
}
.admin-delete-account-button:focus-visible {
    outline: 3px solid #9b2020;
    outline-offset: 3px;
}
.admin-delete-account-button svg {
    flex-shrink: 0;
}
.admin-user-presence {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 12px;
    border: 1px solid #d9ddd5;
    border-radius: 20px;
    background: #f0f2ed;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.5;
    color: #525a4d;
    margin: 14px 0 6px;
}
.admin-user-presence.is-online {
    border-color: #b8dec3;
    background: #e8f6ed;
    color: #206338;
}
.admin-user-presence > span {
    font-size: 10px;
    line-height: 1;
}
.admin-user-identity {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 20px 0;
}
.admin-user-identity > div {
    min-width: 0;
}
.admin-user-avatar {
    width: 72px;
    height: 72px;
    font-size: 28px;
}
a.admin-user-avatar:hover {
    outline: 2px solid var(--blue);
    outline-offset: 3px;
}
.admin-profile-panel h2 {
    font-size: 24px;
}
.admin-profile-portrait {
    display: grid;
    place-items: center;
    width: 144px;
    height: 144px;
    margin: 26px 0;
    overflow: hidden;
    border: 4px solid white;
    border-radius: 50%;
    background: #e9edff;
    box-shadow: 0 0 0 1px #d5dcf5;
    color: var(--blue);
    font-size: 52px;
    font-weight: 700;
}
.admin-profile-portrait img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.admin-main .admin-profile-remove {
    display: flex;
    align-items: center;
    gap: 10px;
    line-height: 1.6;
}
.admin-main .admin-profile-remove input[type=checkbox] {
    width: 18px;
    height: 18px;
    margin: 0;
    padding: 0;
    accent-color: #193df4;
    flex-shrink: 0;
}
.admin-main .admin-profile-remove {
    padding: 14px;
    border: 1px solid #dce0ee;
    border-radius: 8px;
    background: #f6f7fc;
    cursor: pointer;
}
.admin-profile-remove span {
    min-width: 0;
}
.admin-profile-sql {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    font-size: 13px;
}
.admin-header .admin-link {
    padding: 8px;
    color: var(--muted);
    font-size: 11px;
}
.admin-main {
    max-width: 1336px;
    margin: 0 auto;
    padding: 52px 28px 80px;
}
.admin-kicker {
    margin: 0 0 14px;
    font-size: 10px;
    letter-spacing: .17em;
    font-weight: 700;
    color: var(--blue);
}
.admin-main h1 {
    font-family: var(--display);
    font-weight: 900;
    font-size: clamp(36px, 4.5vw, 58px);
    letter-spacing: -1.8px;
    line-height: 1.08;
    margin: 0 0 14px;
}
.admin-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 24px;
    margin: 12px 0 38px;
}
.admin-intro {
    color: var(--muted);
    line-height: 1.6;
}
.admin-back-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 44px;
    margin-bottom: 26px;
    padding: 11px 17px;
    border: 1px solid #cdd5f6;
    border-radius: 8px;
    background: #edf0ff;
    color: #1935c4;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.4;
    text-decoration: none;
}
.admin-back-button:hover {
    border-color: var(--blue);
    background: #e1e7ff;
    color: #1029ad;
}
.admin-back-button:focus-visible {
    outline: 3px solid var(--blue);
    outline-offset: 4px;
}
.admin-back-button svg {
    flex-shrink: 0;
}
.admin-primary, .admin-secondary, .admin-danger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 13px 20px;
    border: 1px solid transparent;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.5;
    text-decoration: none;
    cursor: pointer;
}
.admin-primary {
    background: var(--blue);
    color: white;
    box-shadow: 0 4px 10px #193df41a;
}
.admin-primary:hover {
    background: #122dcc;
}
.admin-primary > span {
    font-size: 22px;
    line-height: 1;
    font-weight: 400;
}
.admin-secondary {
    background: white;
    color: var(--ink);
    border-color: #d9dbd3;
}
.admin-secondary:hover {
    background: #f1f2ec;
}
.admin-secondary:disabled {
    opacity: .6;
    cursor: wait;
}
.admin-list-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding-top: 25px;
    margin-bottom: 22px;
    border-top: 1px solid #ddded6;
}
.admin-list-heading h2 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--body);
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0;
}
.admin-list-heading > p {
    font-size: 12px;
    color: var(--muted);
}
.admin-count {
    display: inline-grid;
    place-items: center;
    min-width: 26px;
    height: 24px;
    padding: 0 7px;
    background: #e7e8e0;
    border-radius: 6px;
    font-size: 12px;
}
.admin-articles-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
}
.admin-article-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
    border: 1px solid #dedfd7;
    border-radius: 12px;
    background: white;
    box-shadow: 0 2px 3px #15151504;
}
.admin-card-image {
    display: block;
    overflow: hidden;
    background: #eceee6;
    border-bottom: 1px solid #1515150a;
}
.admin-card-image img {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}
.admin-card-content {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 22px;
}
.admin-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 16px;
}
.admin-category {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: var(--blue);
    font-weight: 700;
    overflow-wrap: anywhere;
}
.admin-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 9px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
    background: #f0f1eb;
    color: #525749;
}
.admin-badge::before {
    content: '';
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: currentColor;
}
.admin-badge--publie {
    background: #eaf6ed;
    color: #24633b;
}
.admin-badge--brouillon {
    background: #f0f0ed;
    color: #62645a;
}
.admin-badge--en_attente {
    background: #fff4da;
    color: #805a0c;
}
.admin-badge--archive {
    background: #efedfa;
    color: #65528a;
}
.admin-badge--nouvelle {
    background: #eaf0ff;
    color: #2443a9;
}
.admin-badge--en_cours {
    background: #fff4da;
    color: #805a0c;
}
.admin-badge--acceptee {
    background: #eaf6ed;
    color: #24633b;
}
.admin-badge--refusee {
    background: #fff0ee;
    color: #943636;
}
.admin-proposal-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 28px;
}
.admin-proposal-filters a {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 15px;
    border: 1px solid #d9dbd3;
    border-radius: 8px;
    background: white;
    font-size: 13px;
    font-weight: 700;
}
.admin-proposal-filters a[aria-current] {
    color: var(--blue);
    border-color: #bdc9ff;
    background: #edf0ff;
}
.admin-proposal-filters a span {
    font-weight: 400;
}
.admin-proposals-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(440px, 100%), 1fr));
    gap: 24px;
}
.admin-proposal-card h2 {
    font-size: 24px;
    line-height: 1.3;
    overflow-wrap: anywhere;
}
.admin-proposal-description {
    margin: 22px 0;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    line-height: 1.75;
}
.admin-proposal-status-form {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    padding-top: 16px;
    border-top: 1px solid #eceee7;
}
.admin-proposal-status-form label {
    flex-basis: 100%;
    margin: 0;
}
.admin-proposal-status-form select {
    flex: 1;
    min-width: 140px;
    width: auto;
}
.admin-card-content h3 {
    margin: 0 0 18px;
    font-size: 21px;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -.5px;
    overflow-wrap: anywhere;
}
.admin-card-content h3 a:hover {
    color: var(--blue);
}
.admin-card-date {
    margin-top: auto;
    padding-top: 5px;
    font-size: 12px;
    line-height: 1.8;
    color: #383e35;
}
.admin-card-date > span, .admin-card-date time > span {
    color: var(--muted);
}
.admin-card-date > span {
    margin-right: 5px;
}
.admin-card-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid #eceee7;
}
.admin-edit-button {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    border: 1px solid #dde1f1;
    background: #f6f7fd;
    color: var(--blue);
    border-radius: 6px;
    padding: 9px 13px;
    font-size: 12px;
    font-weight: 700;
}
.admin-edit-button:hover {
    background: #eaf0ff;
}
.admin-delete-button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 0 9px 8px;
    color: #9b3434;
    font-size: 11px;
}
.admin-delete-button:hover {
    text-decoration: underline;
}
.admin-panel {
    background: white;
    border: 1px solid #dedfd7;
    border-radius: 12px;
    padding: 30px;
    min-width: 0;
}
.admin-panel legend {
    font-size: 17px;
    font-weight: 700;
    background: var(--paper);
    padding: 0 8px;
}
.admin-login {
    max-width: 540px;
    margin: 30px auto;
    padding: 40px;
    box-shadow: 0 8px 32px #15151505;
}
.admin-login h1 {
    font-size: 40px;
}
.admin-main input.admin-a2f-code {
    padding: 16px;
    text-align: center;
    font-size: 28px;
    font-weight: 700;
    letter-spacing: .4em;
}
.admin-a2f-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 18px;
    margin: 22px 0 14px;
}
.admin-login > p:not(.admin-kicker) {
    color: var(--muted);
    line-height: 1.7;
    margin-bottom: 18px;
}
.admin-main label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    margin: 22px 0 8px;
}
.admin-main input:not([type=hidden]), .admin-main textarea, .admin-main select {
    display: block;
    width: 100%;
    border: 1px solid #ced2c8;
    background: #fff;
    border-radius: 7px;
    padding: 12px;
    font-size: 14px;
}
.admin-main textarea {
    resize: vertical;
    line-height: 1.8;
}
.admin-main input:focus-visible, .admin-main textarea:focus-visible, .admin-main select:focus-visible {
    outline: 2px solid var(--blue);
    outline-offset: 2px;
}
.admin-panel .admin-primary {
    margin-top: 26px;
    width: 100%;
}
.admin-link {
    background: none;
    border: 0;
    padding: 0;
    text-decoration: underline;
    cursor: pointer;
}
.admin-help {
    font-size: 12px;
    line-height: 1.65;
    color: var(--muted);
    margin: 10px 0;
}
.admin-alert, .admin-notice {
    padding: 18px 22px;
    margin-bottom: 24px;
    border: 1px solid;
    border-radius: 8px;
    font-size: 14px;
}
.admin-alert {
    color: #771d1d;
    background: #fff0ee;
    border-color: #eccfcb;
}
.admin-notice {
    color: #194b26;
    background: #eef8ed;
    border-color: #cce2cb;
}
.admin-editor {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(300px, 1fr);
    gap: 28px;
    align-items: start;
}
.admin-section-heading {
    margin-top: 36px;
    padding-top: 28px;
    border-top: 1px solid var(--line);
}
.admin-section-heading h2 {
    font-size: 23px;
    line-height: 1.3;
}
.admin-section-heading p {
    margin-top: 10px;
    color: var(--muted);
    line-height: 1.7;
}
.admin-writing-section {
    margin-top: 24px;
    padding: 22px clamp(14px, 3vw, 24px);
    border: 1px solid #dce1f3;
    border-radius: 12px;
    background: #f8f9ff;
}
.admin-writing-section-title {
    display: flex;
    align-items: center;
    gap: 12px;
}
.admin-writing-section-title > span {
    display: grid;
    place-items: center;
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 9px;
    background: #e7ecff;
    color: #193df4;
    font-size: 13px;
    font-weight: 700;
}
.admin-writing-section-title h3 {
    font-size: 19px;
    line-height: 1.4;
}
.admin-writing-section textarea {
    margin-top: 14px;
}
.admin-rubric-hint {
    margin: 18px 0;
    padding: 20px;
    background: #edf0ff;
    border: 1px solid #d8dffc;
    border-radius: 8px;
    line-height: 1.7;
    font-size: 14px;
}
.admin-rubric-hint .admin-kicker {
    margin-bottom: 8px;
}
.admin-rubric-hint button {
    margin-top: 16px;
}
.admin-rubric-guide {
    margin: 16px 0 28px;
    padding: 14px 18px;
    border: 1px solid #dedfd7;
    border-radius: 8px;
    font-size: 13px;
}
.admin-rubric-guide summary {
    cursor: pointer;
    font-weight: 700;
}
.admin-rubric-guide dt {
    margin-top: 16px;
    color: var(--blue);
    font-weight: 700;
}
.admin-rubric-guide dd {
    margin: 6px 0 0;
    line-height: 1.6;
}
.admin-pagination {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-top: 32px;
}
.admin-pagination a {
    padding: 10px 18px;
    border: 1px solid #d9dbd3;
    border-radius: 7px;
    background: white;
    font-size: 13px;
    font-weight: 700;
}
.admin-article-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
}
.admin-danger {
    background: #9b2020;
    color: white;
}
.admin-danger:hover {
    background: #741818;
}
.admin-delete-zone {
    margin-top: 32px;
    padding: 24px;
    border: 1px solid #edceca;
    border-radius: 12px;
    background: #fff4f1;
}
.admin-delete-zone h2 {
    margin: 0 0 10px;
    font-size: 20px;
}
.admin-delete-zone p {
    margin-bottom: 18px;
    color: #774b45;
    font-size: 13px;
}
.admin-image-preview {
    margin: 18px 0;
}
.admin-image-preview img {
    width: 100%;
    height: auto;
    aspect-ratio: 8 / 5;
    object-fit: contain;
    border: 1px solid #dedfd7;
    border-radius: 8px;
    background: var(--paper);
}
.admin-image-preview figcaption {
    font-size: 12px;
    color: var(--muted);
    margin-top: 8px;
    overflow-wrap: anywhere;
}
.admin-upload-form {
    max-width: 600px;
    margin-bottom: 32px;
}
.admin-media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(250px, 100%), 1fr));
    gap: 24px;
}
.admin-media-card {
    border: 1px solid #dedfd7;
    border-radius: 12px;
    background: white;
    overflow: hidden;
}
.admin-media-card > img {
    width: 100%;
    height: auto;
    aspect-ratio: 8 / 5;
    object-fit: contain;
    background: #eceee6;
}
.admin-media-details {
    padding: 20px;
}
.admin-media-details h2 {
    font-size: 17px;
    line-height: 1.4;
    margin: 0 0 10px;
    overflow-wrap: anywhere;
}
.admin-empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 70px 24px;
    background: white;
    border: 1px dashed #d3d6cb;
    border-radius: 12px;
}
.admin-empty-state > span {
    display: block;
    margin-bottom: 16px;
    font-size: 40px;
    color: var(--blue);
}
.admin-empty-state h3 {
    font-size: 25px;
    margin-bottom: 12px;
}
.admin-empty-state p {
    margin-bottom: 22px;
    color: var(--muted);
}
@media (max-width: 1100px) {
    .admin-header {
        padding: 22px 28px;
    }
    .admin-articles-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .admin-account {
        margin-left: 8px;
        padding-left: 14px;
    }
    .admin-view-site {
        margin-left: 0;
    }
}
@media (max-width: 760px) {
    .admin-header {
        gap: 20px;
        padding: 22px 20px;
    }
    .admin-header nav {
        width: 100%;
        gap: 8px;
    }
    .admin-nav-item {
        padding: 9px 11px;
    }
    .admin-account {
        margin-left: auto;
        padding-left: 0;
        border: 0;
    }
    .admin-account > span:last-child {
        display: none;
    }
    .admin-view-site {
        order: 0;
        width: 100%;
        margin-bottom: 5px;
    }
    .admin-main {
        padding: 32px 20px 56px;
    }
    .admin-title {
        margin: 8px 0 28px;
        align-items: flex-start;
    }
    .admin-main h1 {
        letter-spacing: -1.2px;
    }
    .admin-title .admin-primary {
        padding: 11px 15px;
    }
    .admin-editor {
        grid-template-columns: 1fr;
    }
    .admin-panel, .admin-login {
        padding: 24px;
    }
    .admin-card-content {
        padding: 18px;
    }
    .admin-card-content h3 {
        font-size: 19px;
    }
}
@media (max-width: 580px) {
    .admin-articles-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .admin-card-image img {
        aspect-ratio: 16 / 8;
    }
    .admin-list-heading > p {
        font-size: 10px;
        text-align: right;
    }
    .admin-list-heading h2 {
        font-size: 13px;
    }
    .admin-login h1 {
        font-size: 33px;
    }
}
