h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "Une erreur s'est produite."
    }

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}

/* ---- Hyperdrive ---------------------------------------------------------------------------------------------- */

/* Thème neutre, entièrement décrit par des variables --hd-*. Une instance les redéfinit sans toucher à ce fichier :
   - couleurs principales : Hyperdrive:Branding (AccentColor, AccentTextColor), servies par /branding/theme.css ;
   - tout le reste (polices, formes, fond, pied de page) : style.css du dossier d'habillage (ADR-0024, ADR-0029).
   Les teintes claires sont dérivées de l'accent par color-mix : elles suivent la marque de chaque instance. */
:root {
    /* Couleurs */
    --hd-accent: #0b5cad;
    --hd-accent-text: #ffffff;
    --hd-text: #1b1f24;
    --hd-heading: var(--hd-text);
    --hd-muted: #57606a;
    --hd-border: #d8dee4;
    --hd-danger: #b42318;
    --hd-success: #1a7f37;
    --hd-warning: #8a6100;
    --hd-surface: #f6f8fa;
    --hd-card: #ffffff;
    --hd-input: #ffffff;
    --hd-accent-soft: color-mix(in srgb, var(--hd-accent) 9%, #ffffff);
    --hd-page: color-mix(in srgb, var(--hd-accent) 5%, #f3f5f8);
    --hd-footer-bg: transparent;
    --hd-footer-text: var(--hd-muted);

    /* Typographie */
    --hd-font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
    --hd-font-heading: var(--hd-font-body);
    --hd-heading-weight: 700;
    --hd-heading-transform: none;
    --hd-heading-spacing: -0.01em;
    --hd-button-font: var(--hd-font-body);
    --hd-button-transform: none;
    --hd-button-spacing: normal;

    /* Formes */
    --hd-radius: 14px;
    --hd-radius-sm: 8px;
    --hd-radius-button: var(--hd-radius-sm);
    --hd-shadow: 0 1px 2px rgba(16, 24, 40, 0.06), 0 12px 32px -12px rgba(16, 24, 40, 0.18);
    --hd-card-width: 40rem;
    --hd-card-wide-width: 76rem;
    --hd-logo-height: 5rem;
    --hd-logo-max-width: 24rem;

    color-scheme: light;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    margin: 0;
    font-family: var(--hd-font-body);
    font-size: 1rem;
    color: var(--hd-text);
    background: var(--hd-page);
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    overflow-wrap: break-word;
}

img,
svg {
    max-width: 100%;
}

a {
    color: var(--hd-accent);
    text-underline-offset: 0.15em;
}

h1,
h2 {
    font-family: var(--hd-font-heading);
    font-weight: var(--hd-heading-weight);
    text-transform: var(--hd-heading-transform);
    letter-spacing: var(--hd-heading-spacing);
    color: var(--hd-heading);
}

h1 {
    margin: 0 0 0.75rem;
    font-size: clamp(1.35rem, 1.1rem + 1.2vw, 1.75rem);
    line-height: 1.25;
}

h2 {
    font-size: 1.15rem;
    line-height: 1.3;
}

/* État de l'envoi, annoncé aux lecteurs d'écran et visible de tous. */
.sr-status {
    font-weight: 600;
}

/* ---- Gabarit : logo au-dessus d'une carte centrée ---- */

.site {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    min-height: 100dvh;
}

.site-header {
    position: relative;
    display: flex;
    justify-content: center;
    width: 100%;
    padding: 2.5rem 1rem 1.75rem;
}

/* Sélecteur de langue (ADR-0030) : en haut à droite de l'en-tête, bien visible ; au-dessus du logo sur smartphone. */
.language-switcher {
    position: absolute;
    top: 1rem;
    right: 1rem;
    display: flex;
    gap: 0.35rem;
}

.language-switcher__item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.75rem;
    min-height: 2.25rem;
    padding: 0.25rem 0.6rem;
    font-family: var(--hd-button-font);
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-decoration: none;
    color: var(--hd-text);
    background: var(--hd-card);
    border: 1px solid var(--hd-border);
    border-radius: var(--hd-radius-button);
}

a.language-switcher__item:hover {
    border-color: var(--hd-accent);
    color: var(--hd-accent);
}

.language-switcher__item--current {
    color: var(--hd-accent-text);
    background: var(--hd-accent);
    border-color: var(--hd-accent);
}

.site-header__brand {
    font-family: var(--hd-font-heading);
    font-weight: var(--hd-heading-weight);
    text-transform: var(--hd-heading-transform);
    letter-spacing: var(--hd-heading-spacing);
    font-size: clamp(1.1rem, 0.9rem + 1.5vw, 1.5rem);
    line-height: 1.25;
    text-align: center;
    color: var(--hd-heading);
    text-decoration: none;
}

/* Emplacement du logo (BrandLogo) : image du client, ou nom du service, dans un conteneur de hauteur fixe. Un PNG
   de 2 à 3 fois la hauteur affichée (par exemple 200 px de haut) reste net sur les écrans haute densité. */
.brand-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: var(--hd-logo-height);
    max-width: 100%;
}

.brand-logo__image {
    display: block;
    width: auto;
    height: auto;
    max-height: var(--hd-logo-height);
    max-width: min(var(--hd-logo-max-width), 80vw);
    object-fit: contain;
}

@media (max-width: 600px) {
    .brand-logo {
        min-height: calc(var(--hd-logo-height) * 0.75);
    }

    .brand-logo__image {
        max-height: calc(var(--hd-logo-height) * 0.75);
    }
}

.card {
    background: var(--hd-card);
    border: 1px solid color-mix(in srgb, var(--hd-border) 70%, transparent);
    border-radius: var(--hd-radius);
    box-shadow: var(--hd-shadow);
}

.site-main {
    width: calc(100% - 2rem);
    max-width: var(--hd-card-width);
    margin: 0 1rem 2.5rem;
    padding: 2rem 2.25rem;
}

.site-footer {
    width: 100%;
    margin-top: auto;
    padding: 1.25rem 1rem;
    font-size: 0.875rem;
    background: var(--hd-footer-bg);
    color: var(--hd-footer-text);
}

.site-footer nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem 1.5rem;
}

.site-footer a {
    color: var(--hd-footer-text);
    text-decoration: none;
}

.site-footer a:hover {
    text-decoration: underline;
}

/* Mention de l'éditeur, sous les liens du pied de page. */
.site-footer__credit {
    margin: 0.75rem 0 0;
    text-align: center;
    font-size: 0.8rem;
    opacity: 0.85;
}

.site-footer__credit a {
    text-decoration: underline;
    text-underline-offset: 0.15em;
}

/* Tablette : carte un peu moins aérée. */
@media (max-width: 900px) {
    .site-header {
        padding-top: 2rem;
    }

    .site-main {
        padding: 1.75rem 1.75rem;
    }
}

/* Smartphone : carte presque bord à bord, marges réduites, cibles tactiles confortables. */
@media (max-width: 600px) {
    .site-header {
        flex-direction: column;
        align-items: center;
        gap: 0.75rem;
        padding: 0.75rem 0.75rem 1rem;
    }

    .language-switcher {
        position: static;
        order: -1;
        align-self: flex-end;
    }

    .site-main {
        width: calc(100% - 1rem);
        margin: 0 0.5rem 1.5rem;
        padding: 1.35rem 1.1rem;
        border-radius: var(--hd-radius-sm);
    }

    .site-footer nav {
        flex-direction: column;
        align-items: center;
        gap: 0.6rem;
    }
}

/* ---- Ordinateur : pages de travail en largeur ----
   Les pages marquées .page-wide (dépôt, envoi, gestion) occupent une carte large, organisée en deux colonnes ; les
   pages de lecture (textes légaux, confirmation, signalement, connexion) gardent une carte étroite, plus lisible. */

.site-main:has(.page-wide) {
    max-width: var(--hd-card-wide-width);
}

@media (min-width: 1024px) {
    .site-main:has(.page-wide) {
        padding: 2.5rem 3rem;
    }

    .site-main:has(.page-wide) > .lead {
        max-width: 70ch;
    }

    /* Dépôt : fichiers à gauche, informations et envoi à droite. */
    .transfer-form {
        display: grid;
        grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
        gap: 0 3rem;
        align-items: start;
    }

    .transfer-form__files {
        position: sticky;
        top: 1.5rem;
    }

    .transfer-form__files .dropzone {
        min-height: 20rem;
        justify-content: center;
    }

    .transfer-form__files fieldset {
        margin-bottom: 0;
    }

    .field-row {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        gap: 0 1.25rem;
    }

    /* Envoi : progression à gauche, lien de gestion à droite. */
    .upload-layout {
        display: grid;
        grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
        grid-template-areas: "main side";
        gap: 0 3rem;
        align-items: start;
    }

    .upload-layout__main {
        grid-area: main;
    }

    .upload-layout__side {
        grid-area: side;
        margin-top: 0;
    }

    /* Gestion : récapitulatif et fichiers à gauche, actions à droite. */
    .split {
        display: grid;
        grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
        gap: 0 3rem;
        align-items: start;
    }

    .split__side > :first-child {
        margin-top: 0;
    }
}

/* ---- Textes ---- */

.lead {
    margin: 0 0 1.75rem;
    color: var(--hd-muted);
}

.help {
    margin: 0.35rem 0 0;
    font-size: 0.875rem;
    color: var(--hd-muted);
}

.legal h2 {
    margin-top: 1.75rem;
}

.share-report {
    margin-top: 2rem;
    font-size: 0.875rem;
    color: var(--hd-muted);
}

.dev-notice {
    font-size: 0.85rem;
    color: var(--hd-warning);
}

/* ---- Formulaires ---- */

fieldset {
    border: 0;
    margin: 0 0 1.5rem;
    padding: 0;
    min-width: 0;
}

legend,
label {
    display: block;
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 0.4rem;
}

.field {
    margin-bottom: 1.25rem;
}

/* 16 px au moins : évite le zoom automatique de Safari sur iPhone à la saisie. */
input:not([type=checkbox], [type=radio], [type=file], [type=hidden], [type=submit], [type=button]),
textarea,
select {
    width: 100%;
    min-height: 2.75rem;
    padding: 0.6rem 0.75rem;
    font: inherit;
    font-size: max(1rem, 16px);
    color: var(--hd-text);
    background: var(--hd-input);
    border: 1px solid var(--hd-border);
    border-radius: var(--hd-radius-sm);
    transition: border-color 0.15s, box-shadow 0.15s;
}

textarea {
    resize: vertical;
}

input:hover,
textarea:hover,
select:hover {
    border-color: color-mix(in srgb, var(--hd-text) 30%, var(--hd-border));
}

input:focus,
textarea:focus,
select:focus {
    border-color: var(--hd-accent);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--hd-accent) 20%, transparent);
    outline: none;
}

[aria-invalid=true] {
    border-color: var(--hd-danger);
}

input[type=checkbox],
input[type=radio],
progress {
    accent-color: var(--hd-accent);
}

/* Case à gauche, texte (avec liens) qui s'enroule à sa droite. */
.field--checkbox label {
    position: relative;
    padding-left: 1.75rem;
    font-weight: normal;
}

.field--checkbox input {
    position: absolute;
    left: 0;
    top: 0.2rem;
    width: 1.1rem;
    height: 1.1rem;
    margin: 0;
}

.field--checkbox .help {
    padding-left: 1.75rem;
}

.field-error {
    color: var(--hd-danger);
    font-size: 0.875rem;
    margin: 0.3rem 0 0;
}

:focus-visible {
    outline: 3px solid var(--hd-accent);
    outline-offset: 2px;
}

/* ---- Boutons ---- */

button {
    min-height: 2.75rem;
    font: inherit;
    font-family: var(--hd-button-font);
    font-weight: 600;
    text-transform: var(--hd-button-transform);
    letter-spacing: var(--hd-button-spacing);
    padding: 0.6rem 1.15rem;
    border: 1px solid var(--hd-border);
    border-radius: var(--hd-radius-button);
    background: var(--hd-card);
    color: var(--hd-text);
    cursor: pointer;
    transition: background-color 0.15s, border-color 0.15s, color 0.15s, filter 0.15s;
}

button:hover:not(:disabled) {
    background: var(--hd-surface);
}

button.primary {
    background: var(--hd-accent);
    border-color: var(--hd-accent);
    color: var(--hd-accent-text);
}

button.primary:hover:not(:disabled) {
    background: var(--hd-accent);
    filter: brightness(0.9);
}

.primary--block {
    display: block;
    width: 100%;
    margin-top: 0.5rem;
    padding: 0.8rem 1.25rem;
    font-size: 1.05rem;
}

button.danger {
    border-color: var(--hd-danger);
    color: var(--hd-danger);
}

button.danger:hover:not(:disabled) {
    background: #fdf2f1;
}

button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.link-button {
    min-height: 0;
    border: 0;
    padding: 0;
    font-family: inherit;
    font-weight: normal;
    text-transform: none;
    letter-spacing: normal;
    background: none;
    color: var(--hd-accent);
    text-decoration: underline;
    text-underline-offset: 0.15em;
}

.link-button:hover:not(:disabled) {
    background: none;
}

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 1.25rem 0;
}

@media (max-width: 600px) {
    .actions > button {
        flex: 1 1 100%;
    }
}

/* ---- Dépôt de fichiers ---- */

.dropzone {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
    width: 100%;
    padding: 2.25rem 1rem;
    font-family: var(--hd-font-body);
    font-weight: normal;
    text-transform: none;
    letter-spacing: normal;
    border: 2px dashed color-mix(in srgb, var(--hd-accent) 35%, var(--hd-border));
    border-radius: var(--hd-radius);
    background: var(--hd-accent-soft);
    color: var(--hd-muted);
}

.dropzone:hover:not(:disabled),
.dropzone--active {
    border-color: var(--hd-accent);
    background: color-mix(in srgb, var(--hd-accent) 14%, #ffffff);
}

.dropzone:disabled {
    cursor: progress;
}

.dropzone__icon {
    width: 2.5rem;
    height: 2.5rem;
    margin-bottom: 0.35rem;
    color: var(--hd-accent);
}

.dropzone__title {
    font-weight: 600;
    font-size: 1.05rem;
    color: var(--hd-text);
}

@media (max-width: 600px) {
    .dropzone {
        padding: 1.5rem 0.75rem;
    }
}

.file-list {
    list-style: none;
    margin: 1rem 0 0.5rem;
    padding: 0;
    border: 1px solid var(--hd-border);
    border-radius: var(--hd-radius-sm);
}

.file-list__item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 0.35rem 0.75rem;
    align-items: center;
    padding: 0.6rem 0.85rem;
    border-bottom: 1px solid var(--hd-border);
}

.file-list__item:last-child {
    border-bottom: 0;
}

.file-list__name {
    overflow-wrap: anywhere;
    font-weight: 500;
}

.file-list__size,
.file-list__state {
    color: var(--hd-muted);
    font-size: 0.9rem;
    font-variant-numeric: tabular-nums;
}

.file-list__item progress,
.file-list__item .field-error,
.file-list__notice {
    grid-column: 1 / -1;
}

.file-list__notice {
    font-size: 0.875rem;
    color: var(--hd-muted);
}

@media (max-width: 600px) {
    .file-list__item {
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .file-list__name {
        grid-column: 1 / -1;
    }
}

progress {
    width: 100%;
    height: 0.6rem;
    border: 0;
    border-radius: 999px;
    overflow: hidden;
    background: color-mix(in srgb, var(--hd-accent) 12%, #eef1f4);
    -webkit-appearance: none;
    appearance: none;
}

progress::-webkit-progress-bar {
    background: color-mix(in srgb, var(--hd-accent) 12%, #eef1f4);
    border-radius: 999px;
}

progress::-webkit-progress-value {
    background: var(--hd-accent);
    border-radius: 999px;
    transition: width 0.3s;
}

progress::-moz-progress-bar {
    background: var(--hd-accent);
    border-radius: 999px;
}

.upload-summary {
    margin: 1.25rem 0;
    padding: 1.1rem 1.25rem;
    border-radius: var(--hd-radius-sm);
    background: var(--hd-accent-soft);
}

.upload-summary p {
    margin: 0.5rem 0 0;
    font-variant-numeric: tabular-nums;
}

.antibot {
    display: flex;
    justify-content: center;
}

/* ---- Messages ---- */

.alert {
    margin: 1rem 0;
    padding: 0.8rem 1rem;
    border: 1px solid color-mix(in srgb, var(--hd-danger) 25%, transparent);
    border-left: 4px solid var(--hd-danger);
    border-radius: var(--hd-radius-sm);
    background: #fdf2f1;
}

.alert--info {
    border-color: color-mix(in srgb, var(--hd-accent) 25%, transparent);
    border-left-color: var(--hd-accent);
    background: var(--hd-accent-soft);
}

.alert--success {
    border-color: color-mix(in srgb, var(--hd-success) 25%, transparent);
    border-left-color: var(--hd-success);
    background: #eef8f0;
}

.management-link {
    margin: 1.25rem 0;
    padding: 1.1rem 1.25rem;
    border: 1px solid var(--hd-border);
    border-radius: var(--hd-radius-sm);
    background: var(--hd-surface);
}

.management-link h2 {
    margin-top: 0;
}

.share-message {
    white-space: pre-line;
    overflow-wrap: anywhere;
    padding: 0.85rem 1rem;
    border-left: 3px solid var(--hd-accent);
    border-radius: 0 var(--hd-radius-sm) var(--hd-radius-sm) 0;
    background: var(--hd-surface);
}

/* ---- Gestion ---- */

.manage-summary {
    display: grid;
    grid-template-columns: max-content minmax(0, 1fr);
    gap: 0.45rem 1.25rem;
    margin: 0 0 1.5rem;
}

.manage-recipients {
    margin: 0;
    padding-left: 1.1rem;
}

.manage-summary dt {
    font-weight: 600;
    color: var(--hd-muted);
}

.manage-summary dd {
    margin: 0;
    overflow-wrap: anywhere;
}

@media (max-width: 600px) {
    .manage-summary {
        grid-template-columns: minmax(0, 1fr);
        gap: 0.15rem;
    }

    .manage-summary dd {
        margin-bottom: 0.6rem;
    }
}

/* ---- Administration : même habillage, carte large ---- */

.admin-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    gap: 0.75rem 1.5rem;
    width: 100%;
    max-width: 72rem;
    margin: 0 auto;
    padding: 1.5rem 1rem 1.25rem;
}

.admin-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.15rem;
}

.admin-brand .brand-logo {
    min-height: 2.25rem;
}

.admin-brand .brand-logo__image {
    max-height: 2.25rem;
    max-width: 12rem;
}

.admin-brand__label {
    padding-left: 0.75rem;
    border-left: 1px solid var(--hd-border);
    font-size: 0.95rem;
    color: var(--hd-muted);
}

.admin-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem 1.1rem;
}

.admin-nav a {
    color: var(--hd-muted);
    text-decoration: none;
    font-weight: 500;
}

.admin-nav a:hover {
    color: var(--hd-accent);
}

.admin-logout {
    margin-left: auto;
}

.site-main.admin-main {
    max-width: 72rem;
    margin: 0 auto 2rem;
}

.admin-panel {
    margin: 1.5rem 0;
}

/* Tableaux larges : défilement horizontal dans la carte plutôt que débordement de la page. */
.admin-table {
    display: block;
    width: 100%;
    overflow-x: auto;
    border-collapse: collapse;
    margin: 0.75rem 0 1.25rem;
    font-size: 0.925rem;
}

.admin-table th {
    color: var(--hd-muted);
    font-weight: 600;
    background: var(--hd-surface);
}

.admin-table th,
.admin-table td {
    text-align: left;
    padding: 0.5rem 0.6rem;
    border-bottom: 1px solid var(--hd-border);
    vertical-align: top;
    min-width: 6rem;
}

.admin-table tbody tr:hover {
    background: color-mix(in srgb, var(--hd-accent) 4%, #ffffff);
}

.admin-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.admin-search {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 0 1rem;
}

.admin-pages {
    display: flex;
    gap: 1rem;
}

.recovery-codes {
    columns: 2;
    font-size: 1.05rem;
    font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
}

.totp-qr {
    image-rendering: pixelated;
}

@media (max-width: 600px) {
    .admin-header {
        padding: 1rem 0.75rem;
    }

    .admin-logout {
        margin-left: 0;
    }

    .admin-table {
        font-size: 0.85rem;
    }

    .recovery-codes {
        columns: 1;
    }

    .site-main.admin-main {
        width: calc(100% - 1rem);
        margin: 0 0.5rem 1.5rem;
        padding: 1.25rem 1rem;
    }
}
