/*
================================================================================
MEMORAPORT — SYSTÈME DE DESIGN (cœur)
--------------------------------------------------------------------------------
Identité « bibliothèque moderne » :
- Encre indigo sur papier blanc, vert bibliothèque pour agir (publier,
  valider, envoyer), jaune surligneur réservé aux signaux.
- Signature : la « page de garde » (.cover) qui présente chaque mémoire
  comme une vraie couverture, avec une tranche colorée par domaine.
- Le quadrillage Seyès (.seyes) — le papier d'écolier français — n'apparaît
  qu'à deux endroits : le hero de l'accueil et le panneau d'authentification.

Typo : Geist (interface) + Newsreader (titres de mémoires, citations).
Rayons dégressifs : section 28 → panneau 20 → champ/bouton 12 → page 4.

Les styles propres à une page vivent dans assets/styles/pages/*.css.
================================================================================
*/

:root {
    /* Encre */
    --ink: #161936;
    --ink-2: #4B5070;
    --ink-3: #8A8FA8;
    --night: #12153A;
    --night-2: #1C2154;

    /* Papier */
    --paper: #FFFFFF;
    --canvas: #F5F6F9;
    --line: #E4E6EE;
    --line-soft: #EFF0F5;

    /* Agir */
    --green: #0F7B5C;
    --green-600: #0B6249;
    --green-50: #E6F4EE;
    --green-100: #CDEBDD;

    /* Liens, info */
    --indigo: #3141A8;
    --indigo-50: #EEF0FB;
    --indigo-100: #DCE0F7;

    /* Signal */
    --marker: #FFE14D;
    --marker-50: #FFF7CC;

    /* États */
    --danger: #C2372D;
    --danger-50: #FDECEA;
    --warning: #9A5B00;
    --warning-50: #FFF2DA;

    /* Tranches de couverture */
    --spine-0: #3141A8;
    --spine-1: #0F7B5C;
    --spine-2: #8E2F4F;
    --spine-3: #C08A1E;
    --spine-4: #1F6F8B;
    --spine-5: #6A4C93;
    --spine-6: #3D4A5C;
    --spine-7: #A23B3B;

    /* Typo */
    --font-ui: "Geist", "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
    --font-serif: "Newsreader", "Iowan Old Style", Georgia, serif;

    /* Forme */
    --r-xl: 28px;
    --r-lg: 20px;
    --r-md: 14px;
    --r-sm: 12px;
    --r-xs: 8px;
    --shadow-1: 0 1px 2px rgba(22, 25, 54, .05), 0 1px 1px rgba(22, 25, 54, .03);
    --shadow-2: 0 1px 2px rgba(22, 25, 54, .05), 0 12px 32px -16px rgba(22, 25, 54, .18);
    --shadow-3: 0 2px 6px rgba(22, 25, 54, .06), 0 28px 56px -24px rgba(22, 25, 54, .35);

    --nav-h: 68px;
    --container: 1200px;
    --ease: cubic-bezier(.2, .7, .2, 1);

    /* Compatibilité avec d'anciennes variables encore référencées */
    --color-primary: var(--green);
    --color-primary-dark: var(--green-600);
    --color-primary-light: var(--green-50);
    --color-text: var(--ink);
    --color-text-light: var(--ink-2);
    --color-background: var(--canvas);
    --color-white: var(--paper);
    --color-border: var(--line);
    --color-danger: var(--danger);
    --radius-small: var(--r-xs);
    --radius-medium: var(--r-md);
    --shadow-small: var(--shadow-1);
}

/*
--------------------------------------------------------------------------------
BASE
--------------------------------------------------------------------------------
*/

*, *::before, *::after { box-sizing: border-box; }

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--canvas);
    color: var(--ink);
    font-family: var(--font-ui);
    font-size: 16px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    font-feature-settings: "ss01", "cv11";
}

h1, h2, h3, h4, h5, h6 {
    margin: 0 0 .5em;
    color: var(--ink);
    font-family: var(--font-ui);
    font-weight: 650;
    line-height: 1.15;
    letter-spacing: -.02em;
}

h1 { font-size: clamp(1.9rem, 1.45rem + 1.8vw, 2.75rem); font-weight: 700; letter-spacing: -.035em; }
h2 { font-size: clamp(1.35rem, 1.2rem + .6vw, 1.7rem); letter-spacing: -.025em; }
h3 { font-size: 1.15rem; }
h4 { font-size: 1rem; }

p { margin: 0 0 1em; }

a { color: var(--indigo); text-decoration: none; }
a:hover { color: var(--ink); }

img, svg { max-width: 100%; }
img { height: auto; display: block; }

button, input, textarea, select { font: inherit; color: inherit; }

hr { border: 0; border-top: 1px solid var(--line); margin: 28px 0; }

::selection { background: var(--marker); color: var(--ink); }

:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--green) 45%, transparent);
    outline-offset: 2px;
    border-radius: 6px;
}

.icon {
    width: 1.2em;
    height: 1.2em;
    flex-shrink: 0;
    vertical-align: -.22em;
}

.sr-only {
    position: absolute;
    width: 1px; height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.serif { font-family: var(--font-serif); letter-spacing: -.01em; }
.muted { color: var(--ink-2); }
.faint { color: var(--ink-3); }
.mark { background: linear-gradient(transparent 55%, var(--marker) 55%); padding: 0 .1em; }

/*
--------------------------------------------------------------------------------
MISE EN PAGE
--------------------------------------------------------------------------------
*/

.container {
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 24px;
}

.container-narrow { max-width: 820px; }
.container-tight { max-width: 560px; }

.site-main { flex: 1 0 auto; }

.page { padding-top: 36px; padding-bottom: 80px; }
.page-tight { padding-top: 24px; }

.page-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px 24px;
    margin-bottom: 28px;
}

.page-head h1 { margin: 0 0 6px; }
.page-head .lead { margin: 0; }
.page-head-actions { display: flex; flex-wrap: wrap; gap: 10px; }

.lead {
    color: var(--ink-2);
    font-size: 1.08rem;
    max-width: 62ch;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin: 0 0 18px;
    padding: 0;
    list-style: none;
    font-size: .88rem;
    color: var(--ink-3);
}

.breadcrumb a { color: var(--ink-2); font-weight: 500; }
.breadcrumb a:hover { color: var(--ink); }
.breadcrumb .icon { width: 14px; height: 14px; }
.breadcrumb [aria-current] { color: var(--ink); font-weight: 500; max-width: 46ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.stack > * + * { margin-top: 16px; }
.stack-lg > * + * { margin-top: 28px; }

.grid { display: grid; gap: 20px; }
.grid-2 { display: grid; gap: 20px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { display: grid; gap: 20px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { display: grid; gap: 20px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-auto { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }

.split {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 28px;
    align-items: start;
}

.split-left {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 28px;
    align-items: start;
}

.sticky { position: sticky; top: calc(var(--nav-h) + 20px); }

.row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

/*
--------------------------------------------------------------------------------
NAVIGATION
--------------------------------------------------------------------------------
*/

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, .88);
    backdrop-filter: saturate(1.6) blur(14px);
    -webkit-backdrop-filter: saturate(1.6) blur(14px);
    border-bottom: 1px solid var(--line);
}

.nav {
    display: flex;
    align-items: center;
    gap: 28px;
    min-height: var(--nav-h);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--ink);
    font-weight: 700;
    font-size: 1.12rem;
    letter-spacing: -.03em;
    flex-shrink: 0;
}

.brand:hover { color: var(--ink); }

.brand-mark {
    width: 30px;
    height: 34px;
    flex-shrink: 0;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2px;
}

.nav-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 13px;
    border-radius: 999px;
    color: var(--ink-2);
    font-weight: 550;
    font-size: .94rem;
    white-space: nowrap;
    transition: background .15s ease, color .15s ease;
}

.nav-link:hover { background: var(--line-soft); color: var(--ink); }
.nav-link.is-active { color: var(--ink); background: var(--line-soft); }

.nav-right {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-icon {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    color: var(--ink-2);
    transition: background .15s ease, color .15s ease;
}

.nav-icon:hover { background: var(--line-soft); color: var(--ink); }
.nav-icon .icon { width: 21px; height: 21px; }

.nav-dot {
    position: absolute;
    top: 6px;
    right: 5px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: var(--danger);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    line-height: 18px;
    text-align: center;
    box-shadow: 0 0 0 2px #fff;
}

/* Menu compte */
.account { position: relative; }

.account > summary {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 3px 10px 3px 3px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--paper);
    cursor: pointer;
    transition: border-color .15s ease, box-shadow .15s ease;
}

.account > summary::-webkit-details-marker { display: none; }
.account > summary:hover { border-color: #CDD1DE; }
.account[open] > summary { box-shadow: 0 0 0 4px var(--line-soft); }
.account-name { font-weight: 600; font-size: .92rem; max-width: 12ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account > summary .icon { width: 16px; height: 16px; color: var(--ink-3); }

.account-menu {
    position: absolute;
    right: 0;
    top: calc(100% + 10px);
    width: 260px;
    padding: 8px;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: var(--shadow-3);
    animation: pop-in .18s var(--ease);
}

.account-menu-head {
    padding: 10px 12px 12px;
    border-bottom: 1px solid var(--line-soft);
    margin-bottom: 6px;
}

.account-menu-head strong { display: block; font-size: .95rem; }
.account-menu-head span { font-size: .82rem; color: var(--ink-3); word-break: break-all; }

.account-menu a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: 10px;
    color: var(--ink);
    font-size: .93rem;
    font-weight: 500;
}

.account-menu a:hover { background: var(--canvas); }
.account-menu a .icon { color: var(--ink-3); width: 18px; height: 18px; }
.account-menu .is-danger { color: var(--danger); }
.account-menu .is-danger .icon { color: var(--danger); }
.account-menu hr { margin: 6px 4px; border-color: var(--line-soft); }

.nav-toggle { position: absolute; opacity: 0; pointer-events: none; }
.nav-burger { display: none; }

@keyframes pop-in {
    from { opacity: 0; transform: translateY(-4px) scale(.98); }
    to { opacity: 1; transform: none; }
}

/*
--------------------------------------------------------------------------------
PIED DE PAGE
--------------------------------------------------------------------------------
*/

.site-footer {
    background: var(--night);
    color: rgba(255, 255, 255, .64);
    padding: 64px 0 0;
    font-size: .93rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.6fr 1fr 1fr 1fr;
    gap: 40px;
    padding-bottom: 48px;
}

.site-footer .brand { color: #fff; margin-bottom: 16px; }
.footer-tagline {
    font-family: var(--font-serif);
    font-size: 1.45rem;
    line-height: 1.25;
    color: #fff;
    max-width: 22ch;
    margin-bottom: 14px;
}

.site-footer h2 {
    color: #fff;
    font-size: .95rem;
    font-weight: 600;
    letter-spacing: 0;
    margin-bottom: 14px;
}

.site-footer a { display: block; color: rgba(255, 255, 255, .66); padding: 4px 0; }
.site-footer a:hover { color: #fff; }

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, .1);
    padding: 20px 0 26px;
    font-size: .85rem;
    color: rgba(255, 255, 255, .45);
}

.footer-bottom .container { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.footer-bottom p { margin: 0; }

/*
--------------------------------------------------------------------------------
BOUTONS
--------------------------------------------------------------------------------
*/

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 10px 18px;
    border: 1px solid transparent;
    border-radius: var(--r-sm);
    background: var(--paper);
    color: var(--ink);
    font-weight: 600;
    font-size: .95rem;
    line-height: 1.2;
    text-align: center;
    white-space: nowrap;
    cursor: pointer;
    transition: background .15s ease, border-color .15s ease, color .15s ease, box-shadow .2s ease, transform .08s ease;
}

.btn:active { transform: translateY(1px); }
.btn[disabled], .btn.is-disabled { opacity: .5; pointer-events: none; }
.btn .icon { width: 18px; height: 18px; }

.btn-primary {
    background: var(--green);
    color: #fff;
    box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .12), 0 6px 16px -8px rgba(15, 123, 92, .7);
}
.btn-primary:hover { background: var(--green-600); color: #fff; }

.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: var(--night-2); color: #fff; }

.btn-secondary, .btn-outline {
    background: var(--paper);
    border-color: var(--line);
    color: var(--ink);
}
.btn-secondary:hover, .btn-outline:hover { border-color: #C7CCDA; background: var(--canvas); color: var(--ink); }

.btn-ghost { background: transparent; color: var(--ink-2); }
.btn-ghost:hover { background: var(--line-soft); color: var(--ink); }

.btn-danger { background: var(--danger-50); color: var(--danger); }
.btn-danger:hover { background: var(--danger); color: #fff; }

.btn-success { background: var(--green); color: #fff; }
.btn-success:hover { background: var(--green-600); color: #fff; }

.btn-warning { background: var(--warning-50); color: var(--warning); }
.btn-warning:hover { background: var(--warning); color: #fff; }

.btn-marker { background: var(--marker); color: var(--ink); }
.btn-marker:hover { background: #FFD61A; color: var(--ink); }

.btn-light { background: #fff; color: var(--ink); }
.btn-light:hover { background: var(--marker-50); color: var(--ink); }

.btn-sm { min-height: 36px; padding: 7px 13px; font-size: .87rem; border-radius: 10px; }
.btn-sm .icon { width: 16px; height: 16px; }
.btn-lg { min-height: 54px; padding: 14px 24px; font-size: 1.02rem; border-radius: 14px; }
.btn-block { width: 100%; }

.btn-icon {
    width: 40px;
    min-height: 40px;
    padding: 0;
    border-radius: 50%;
}

.btn-chip {
    min-height: 36px;
    padding: 6px 12px;
    border-radius: 999px;
    border-color: var(--line);
    font-size: .86rem;
    font-weight: 550;
    color: var(--ink-2);
}
.btn-chip:hover { color: var(--ink); border-color: #C7CCDA; }
.btn-chip.is-on { color: var(--danger); border-color: #F3C9C5; background: var(--danger-50); }
.btn-chip.is-on .icon { fill: currentColor; }
.btn-chip.is-saved { color: var(--green); border-color: var(--green-100); background: var(--green-50); }
.btn-chip.is-saved .icon { fill: currentColor; }
.btn-chip[aria-expanded="true"] { color: var(--ink); background: var(--line-soft); border-color: #C7CCDA; }

.link-btn {
    background: none;
    border: 0;
    padding: 0;
    color: var(--indigo);
    font-weight: 600;
    cursor: pointer;
}
.link-btn:hover { color: var(--ink); }
.link-danger { color: var(--danger); }

/* Formulaires d'une seule action (bouton) : jamais habillés */
form.inline,
.inline-form {
    display: inline-flex;
    margin: 0;
    padding: 0;
    background: none;
    border: 0;
}

/*
--------------------------------------------------------------------------------
SURFACES
--------------------------------------------------------------------------------
*/

.panel {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-1);
    padding: 24px;
}

.panel + .panel { margin-top: 20px; }
.panel-lg { padding: 32px; }
.panel-flush { padding: 0; overflow: hidden; }
.panel-soft { background: var(--canvas); box-shadow: none; }

.panel-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px 20px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

.panel-head h2, .panel-head h3 { margin: 0; }
.panel-head p { margin: 4px 0 0; color: var(--ink-2); font-size: .94rem; }
.panel-flush .panel-head { padding: 20px 24px 0; }

.panel-title { font-size: 1.12rem; margin: 0 0 14px; letter-spacing: -.015em; }

.section { padding: 72px 0; }
.section-head { margin-bottom: 28px; max-width: 60ch; }
.section-head h2 { margin-bottom: 8px; }
.section-head p { color: var(--ink-2); margin: 0; }
.section-head-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 26px; }
.section-head-row h2 { margin: 0 0 4px; }
.section-head-row p { margin: 0; color: var(--ink-2); }

/* Le papier Seyès (deux usages seulement) */
.seyes {
    background-color: #fff;
    background-image:
        linear-gradient(90deg, transparent calc(9% - 1px), rgba(214, 64, 104, .32) calc(9% - 1px), rgba(214, 64, 104, .32) 9%, transparent 9%),
        linear-gradient(rgba(112, 104, 196, .16) 1px, transparent 1px),
        linear-gradient(90deg, rgba(112, 104, 196, .10) 1px, transparent 1px),
        linear-gradient(rgba(112, 104, 196, .06) 1px, transparent 1px);
    background-size: 100% 100%, 32px 32px, 32px 32px, 8px 8px;
    background-position: 0 0, 0 -1px, -1px 0, 0 -1px;
}

/*
--------------------------------------------------------------------------------
PAGE DE GARDE (signature)
--------------------------------------------------------------------------------
*/

.cover {
    --spine: var(--spine-0);
    position: relative;
    display: block;
    aspect-ratio: 210 / 280;
    border-radius: 4px 6px 6px 4px;
    background: #fff;
    color: var(--ink);
    box-shadow:
        inset 9px 0 0 var(--spine),
        inset 11px 0 0 rgba(255, 255, 255, .5),
        0 1px 1px rgba(22, 25, 54, .08),
        0 10px 24px -14px rgba(22, 25, 54, .45);
    transition: transform .25s var(--ease), box-shadow .25s ease;
    overflow: hidden;
    isolation: isolate;
}

.cover::after {
    /* grain de papier et pli de reliure */
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(22, 25, 54, .10) 9px, rgba(255, 255, 255, 0) 22px),
        linear-gradient(160deg, rgba(255, 255, 255, 0) 60%, rgba(22, 25, 54, .035));
    pointer-events: none;
    z-index: 1;
}

a.cover:hover {
    transform: translateY(-4px) rotate(-.4deg);
    box-shadow:
        inset 9px 0 0 var(--spine),
        inset 11px 0 0 rgba(255, 255, 255, .5),
        0 2px 2px rgba(22, 25, 54, .08),
        0 22px 40px -18px rgba(22, 25, 54, .55);
    color: var(--ink);
}

.cover-sheet {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    padding: 9% 9% 8% 15%;
    z-index: 2;
}

.cover-inst {
    font-size: .64em;
    font-weight: 600;
    letter-spacing: .01em;
    color: var(--ink-2);
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.cover-rule {
    display: block;
    width: 34%;
    height: 2px;
    margin: 9% 0 7%;
    background: var(--spine);
    border-radius: 2px;
}

.cover-kind {
    font-size: .6em;
    font-weight: 500;
    color: var(--ink-3);
    margin-bottom: 4%;
}

.cover-title {
    font-family: var(--font-serif);
    font-size: 1.12em;
    font-weight: 500;
    line-height: 1.16;
    letter-spacing: -.01em;
    color: var(--ink);
    display: -webkit-box;
    -webkit-line-clamp: 5;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-wrap: balance;
}

.cover-foot {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: .64em;
    line-height: 1.3;
}

.cover-author { font-weight: 600; color: var(--ink); }
.cover-year { color: var(--ink-3); font-variant-numeric: tabular-nums; }

.cover-sm { font-size: 11px; width: 120px; }

/* Vignette : seul le titre et la tranche restent, le reste deviendrait du bruit */
.cover-xs, .mrow .cover, .rank .cover { font-size: 6px; }
.cover-xs .cover-inst, .cover-xs .cover-kind, .cover-xs .cover-foot,
.mrow .cover .cover-inst, .mrow .cover .cover-kind, .mrow .cover .cover-foot { visibility: hidden; }
.cover-xs .cover-title, .mrow .cover .cover-title { -webkit-line-clamp: 4; font-size: 1.3em; }
.cover-xs .cover-rule, .mrow .cover .cover-rule { margin: 30% 0 12%; }
.cover-md { font-size: 15px; }
.cover-lg { font-size: 20px; }

.spine-0 { --spine: var(--spine-0); }
.spine-1 { --spine: var(--spine-1); }
.spine-2 { --spine: var(--spine-2); }
.spine-3 { --spine: var(--spine-3); }
.spine-4 { --spine: var(--spine-4); }
.spine-5 { --spine: var(--spine-5); }
.spine-6 { --spine: var(--spine-6); }
.spine-7 { --spine: var(--spine-7); }

/* Carte mémoire : couverture + pied d'informations */
.mcard {
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-width: 0;
}

.mcard-body { display: flex; flex-direction: column; gap: 6px; min-width: 0; }

.mcard-title {
    margin: 0;
    font-family: var(--font-serif);
    font-weight: 500;
    font-size: 1.12rem;
    line-height: 1.25;
    letter-spacing: -.01em;
}

.mcard-title a { color: var(--ink); }
.mcard-title a:hover { color: var(--green); }

.mcard-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 12px;
    font-size: .85rem;
    color: var(--ink-3);
}

.mcard-meta span { display: inline-flex; align-items: center; gap: 5px; }
.mcard-meta .icon { width: 15px; height: 15px; }

/* Ligne horizontale mini-couverture + texte */
.mrow {
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr) auto;
    align-items: center;
    gap: 16px;
    padding: 14px 0;
    border-top: 1px solid var(--line-soft);
}

.mrow:first-child { border-top: 0; }
.mrow .cover { font-size: 6px; width: 64px; }
.mrow-title { margin: 0 0 3px; font-family: var(--font-serif); font-size: 1.05rem; font-weight: 500; line-height: 1.25; }
.mrow-title a { color: var(--ink); }
.mrow-title a:hover { color: var(--green); }
.mrow-meta { font-size: .85rem; color: var(--ink-3); display: flex; flex-wrap: wrap; gap: 4px 12px; }
.mrow-side { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }

.shelf {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 32px 24px;
}

/*
--------------------------------------------------------------------------------
FORMULAIRES
--------------------------------------------------------------------------------
*/

label,
.form-label {
    display: block;
    margin-bottom: 7px;
    font-weight: 600;
    font-size: .9rem;
    color: var(--ink);
}

input[type="text"], input[type="email"], input[type="password"], input[type="search"],
input[type="url"], input[type="tel"], input[type="number"], input[type="date"],
input[type="datetime-local"], input[type="file"], input:not([type]),
select, textarea {
    width: 100%;
    min-height: 46px;
    padding: 11px 14px;
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
    background: var(--paper);
    color: var(--ink);
    font-size: .97rem;
    box-shadow: inset 0 1px 1px rgba(22, 25, 54, .03);
    transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}

input::placeholder, textarea::placeholder { color: var(--ink-3); }
input:hover, select:hover, textarea:hover { border-color: #CDD1DE; }

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--green);
    box-shadow: 0 0 0 4px var(--green-50);
}

textarea { min-height: 130px; resize: vertical; line-height: 1.55; }

select {
    appearance: none;
    -webkit-appearance: none;
    padding-right: 40px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%238A8FA8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m4 6 4 4 4-4'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    cursor: pointer;
}

select[multiple] { background-image: none; padding-right: 14px; min-height: 120px; }

input[type="file"] {
    padding: 10px;
    background: var(--canvas);
    border-style: dashed;
    cursor: pointer;
}

input[type="file"]::file-selector-button {
    margin-right: 12px;
    padding: 8px 14px;
    border: 0;
    border-radius: 9px;
    background: var(--ink);
    color: #fff;
    font-weight: 600;
    cursor: pointer;
}

input[type="checkbox"], input[type="radio"] {
    width: 18px;
    height: 18px;
    margin: 0;
    accent-color: var(--green);
    vertical-align: middle;
    cursor: pointer;
}

input:disabled, select:disabled, textarea:disabled { background: var(--canvas); color: var(--ink-3); cursor: not-allowed; }

/* Champ générique : label + contrôle + aide + erreurs */
.field, .form-field, .form-group { margin-bottom: 18px; min-width: 0; }
.field > label, .form-field > label { margin-bottom: 7px; }

.field-help, .form-help, .help-text, .form-text {
    display: block;
    margin-top: 7px;
    font-size: .84rem;
    color: var(--ink-3);
    line-height: 1.45;
}

.field-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 16px;
}

.field-row-3 {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0 16px;
}

/* Sortie par défaut des form_row Symfony */
form > div:has(> label + :is(input, select, textarea)),
.form-body > div:has(> label) { margin-bottom: 18px; }

form ul:not([class]) {
    list-style: none;
    margin: 6px 0 0;
    padding: 0;
}

form ul:not([class]) li,
.form-error, .invalid-feedback, .field-error {
    display: flex;
    gap: 6px;
    align-items: flex-start;
    color: var(--danger);
    font-size: .86rem;
    font-weight: 500;
    margin-top: 6px;
}

form ul:not([class]) li::before { content: "!"; display: inline-grid; place-items: center; width: 16px; height: 16px; border-radius: 50%; background: var(--danger); color: #fff; font-size: 11px; font-weight: 800; flex-shrink: 0; margin-top: 2px; }

.check, .form-check, div:has(> input[type="checkbox"] + label), div:has(> input[type="radio"] + label) {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

/* Symfony rend parfois le libellé AVANT la case : on remet la case à gauche */
div:has(> label + input[type="checkbox"]), div:has(> label + input[type="radio"]) {
    display: flex;
    flex-direction: row-reverse;
    justify-content: flex-end;
    align-items: flex-start;
    gap: 10px;
}

div:has(> label + input[type="checkbox"]) > label,
div:has(> label + input[type="radio"]) > label { margin: 0; font-weight: 500; line-height: 1.4; }
div:has(> label + input[type="checkbox"]) > input { margin-top: 1px; flex-shrink: 0; }

.check label, .form-check label,
div:has(> input[type="checkbox"] + label) > label,
div:has(> input[type="radio"] + label) > label {
    margin: 0;
    font-weight: 500;
    line-height: 1.4;
}

.check input, .form-check input { margin-top: 2px; }

.check-card {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    background: var(--paper);
    cursor: pointer;
    transition: border-color .15s ease, background .15s ease;
}

.check-card:hover { border-color: #CDD1DE; }
.check-card:has(input:checked) { border-color: var(--green); background: var(--green-50); }
.check-card input { margin-top: 3px; }
.check-card strong { display: block; font-size: .95rem; }
.check-card span { font-size: .86rem; color: var(--ink-2); }

.form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    padding-top: 20px;
    margin-top: 8px;
    border-top: 1px solid var(--line-soft);
}

.form-section {
    padding: 28px;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-1);
}

.form-section + .form-section { margin-top: 20px; }

.form-section-head {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    margin-bottom: 22px;
}

.form-section-head h2 { font-size: 1.2rem; margin: 0 0 4px; }
.form-section-head p { margin: 0; color: var(--ink-2); font-size: .94rem; }

.step-num {
    display: inline-grid;
    place-items: center;
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    border-radius: 10px;
    background: var(--ink);
    color: #fff;
    font-weight: 700;
    font-size: .9rem;
    font-variant-numeric: tabular-nums;
}

/* Barre de recherche */
.searchbar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 6px 6px 18px;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: var(--shadow-2);
    transition: border-color .15s ease, box-shadow .15s ease;
}

.searchbar:focus-within { border-color: var(--green); box-shadow: 0 0 0 4px var(--green-50), var(--shadow-2); }
.searchbar > .icon { color: var(--ink-3); width: 22px; height: 22px; }

.searchbar input {
    flex: 1;
    min-width: 0;
    border: 0;
    box-shadow: none !important;
    padding: 10px 4px;
    background: transparent;
    font-size: 1.02rem;
}

.searchbar .btn { min-height: 48px; border-radius: 12px; }

/*
--------------------------------------------------------------------------------
BADGES, STATUTS, ÉTIQUETTES
--------------------------------------------------------------------------------
*/

.status {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 4px 11px 4px 9px;
    border-radius: 999px;
    font-size: .8rem;
    font-weight: 600;
    line-height: 1.3;
    white-space: nowrap;
    background: var(--line-soft);
    color: var(--ink-2);
}

.status::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: currentColor;
    flex-shrink: 0;
}

.status-draft     { background: var(--line-soft); color: var(--ink-2); }
.status-pending   { background: var(--warning-50); color: var(--warning); }
.status-modify    { background: var(--marker-50); color: #7A5C00; }
.status-validated { background: var(--indigo-50); color: var(--indigo); }
.status-published { background: var(--green-50); color: var(--green); }
.status-refused   { background: var(--danger-50); color: var(--danger); }
.status-hidden, .status-archived { background: var(--line-soft); color: var(--ink-3); }

.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: .78rem;
    font-weight: 600;
    background: var(--line-soft);
    color: var(--ink-2);
    white-space: nowrap;
}

.badge .icon { width: 14px; height: 14px; }
.badge-green { background: var(--green-50); color: var(--green); }
.badge-indigo { background: var(--indigo-50); color: var(--indigo); }
.badge-marker { background: var(--marker); color: var(--ink); }
.badge-danger { background: var(--danger-50); color: var(--danger); }
.badge-warning { background: var(--warning-50); color: var(--warning); }
.badge-dark { background: var(--ink); color: #fff; }

.tag {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 999px;
    background: var(--paper);
    border: 1px solid var(--line);
    font-size: .86rem;
    font-weight: 500;
    color: var(--ink-2);
}

a.tag:hover { border-color: var(--ink-3); color: var(--ink); }
.tags { display: flex; flex-wrap: wrap; gap: 8px; }

.stars { color: var(--line); letter-spacing: 1px; font-size: 1rem; white-space: nowrap; }
.stars .is-on { color: #E8A300; }

.rating-inline { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.rating-inline .stars { font-size: .95rem; }

/*
--------------------------------------------------------------------------------
AVATARS
--------------------------------------------------------------------------------
*/

.avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--line-soft);
    color: var(--ink-2);
    font-weight: 700;
    font-size: .86rem;
    letter-spacing: .01em;
}

.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar-xs { width: 28px; height: 28px; font-size: .7rem; }
.avatar-sm { width: 34px; height: 34px; font-size: .78rem; }
.avatar-md { width: 40px; height: 40px; }
.avatar-lg { width: 64px; height: 64px; font-size: 1.25rem; }
.avatar-xl { width: 112px; height: 112px; font-size: 2rem; }

.avatar-initials.hue-0 { background: #E6E9FB; color: #2B3797; }
.avatar-initials.hue-1 { background: #DFF3EA; color: #0B6249; }
.avatar-initials.hue-2 { background: #F7E4EA; color: #7D2443; }
.avatar-initials.hue-3 { background: #FBEFD6; color: #7E5A0B; }
.avatar-initials.hue-4 { background: #DDF0F6; color: #165A72; }
.avatar-initials.hue-5 { background: #ECE5F6; color: #553A7C; }

.person { display: flex; align-items: center; gap: 12px; min-width: 0; }
.person strong { display: block; font-size: .95rem; line-height: 1.25; }
.person span:not(.avatar) { display: block; font-size: .84rem; color: var(--ink-3); }
.person a { color: var(--ink); }
.person a:hover { color: var(--green); }

/*
--------------------------------------------------------------------------------
STATISTIQUES
--------------------------------------------------------------------------------
*/

.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 14px;
}

.stat {
    position: relative;
    padding: 18px 20px;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-1);
}

.stat-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: .88rem;
    color: var(--ink-2);
    font-weight: 500;
    margin-bottom: 10px;
}

.stat-label .icon { width: 17px; height: 17px; color: var(--ink-3); }

.stat-value {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -.04em;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.stat-note { display: block; margin-top: 8px; font-size: .82rem; color: var(--ink-3); }
.stat.is-highlight { background: var(--ink); border-color: var(--ink); }
.stat.is-highlight .stat-label, .stat.is-highlight .stat-label .icon, .stat.is-highlight .stat-note { color: rgba(255, 255, 255, .65); }
.stat.is-highlight .stat-value { color: #fff; }
.stat.is-warning { border-color: #F2D8A6; background: var(--warning-50); }
.stat.is-danger { border-color: #F3C9C5; background: var(--danger-50); }

/*
--------------------------------------------------------------------------------
TABLEAUX & LISTES
--------------------------------------------------------------------------------
*/

.table-wrap {
    position: relative; /* contient aussi les éléments positionnés des cellules */
    overflow-x: auto;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-1);
}

table, .table {
    width: 100%;
    border-collapse: collapse;
    font-size: .93rem;
}

table th, .table th {
    padding: 12px 18px;
    text-align: left;
    font-size: .8rem;
    font-weight: 600;
    color: var(--ink-3);
    background: var(--canvas);
    border-bottom: 1px solid var(--line);
    white-space: nowrap;
}

table td, .table td {
    padding: 14px 18px;
    border-bottom: 1px solid var(--line-soft);
    vertical-align: middle;
}

table tbody tr:last-child td { border-bottom: 0; }
table tbody tr:hover td { background: #FAFBFD; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }

.list { list-style: none; margin: 0; padding: 0; }

.list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 14px 0;
    border-top: 1px solid var(--line-soft);
}

.list-item:first-child { border-top: 0; padding-top: 0; }

.dl {
    display: grid;
    gap: 0;
    margin: 0;
}

.dl > div {
    display: grid;
    grid-template-columns: minmax(120px, 40%) 1fr;
    gap: 12px;
    padding: 11px 0;
    border-top: 1px solid var(--line-soft);
}

.dl > div:first-child { border-top: 0; padding-top: 0; }
.dl dt { color: var(--ink-3); font-size: .88rem; }
.dl dd { margin: 0; font-weight: 550; font-size: .93rem; word-break: break-word; }

.dl-stack > div { grid-template-columns: 1fr; gap: 2px; }

/*
--------------------------------------------------------------------------------
ÉTATS : VIDE, ALERTES
--------------------------------------------------------------------------------
*/

.empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 52px 24px;
    border: 1.5px dashed var(--line);
    border-radius: var(--r-lg);
    background: rgba(255, 255, 255, .55);
    color: var(--ink-2);
}

.empty h2, .empty h3 { margin-bottom: 6px; font-size: 1.15rem; }
.empty p { max-width: 46ch; margin: 0 0 18px; }
.empty > .icon, .empty-icon {
    width: 52px;
    height: 52px;
    padding: 13px;
    margin-bottom: 14px;
    border-radius: 16px;
    background: var(--paper);
    border: 1px solid var(--line);
    color: var(--ink-2);
    box-shadow: var(--shadow-1);
}

.empty-sm { padding: 26px 20px; }

.alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 0 0 16px;
    padding: 13px 16px;
    border-radius: var(--r-md);
    border: 1px solid transparent;
    font-size: .94rem;
    font-weight: 500;
}

.alert .icon { width: 19px; height: 19px; margin-top: 1px; }
.alert p { margin: 0; }
.alert-success { background: var(--green-50); color: var(--green-600); border-color: var(--green-100); }
.alert-error, .alert-danger { background: var(--danger-50); color: var(--danger); border-color: #F3C9C5; }
.alert-info { background: var(--indigo-50); color: var(--indigo); border-color: var(--indigo-100); }
.alert-warning { background: var(--warning-50); color: var(--warning); border-color: #F2D8A6; }

.flash-stack { padding-top: 20px; }
.flash-stack:empty { display: none; }

/* Note d'information (bandeau dans une page) */
.note {
    display: flex;
    gap: 14px;
    padding: 18px 20px;
    border-radius: var(--r-md);
    background: var(--marker-50);
    border: 1px solid #F3E39A;
    color: #5C4800;
}

.note .icon { width: 20px; height: 20px; flex-shrink: 0; margin-top: 2px; }
.note p { margin: 0; }
.note strong { color: var(--ink); }

/*
--------------------------------------------------------------------------------
NAVIGATION D'ESPACE (tableaux de bord)
--------------------------------------------------------------------------------
*/

.workspace {
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
    gap: 32px;
    align-items: start;
}

.workspace > * { min-width: 0; }

.side-nav {
    position: sticky;
    top: calc(var(--nav-h) + 24px);
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.side-nav-title {
    padding: 0 12px;
    margin: 0 0 8px;
    font-size: .8rem;
    font-weight: 600;
    color: var(--ink-3);
}

.side-nav-title:not(:first-child) { margin-top: 18px; }

.side-nav a {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 9px 12px;
    border-radius: 11px;
    color: var(--ink-2);
    font-weight: 550;
    font-size: .93rem;
}

.side-nav a:hover { background: var(--paper); color: var(--ink); }
.side-nav a.is-active { background: var(--paper); color: var(--ink); box-shadow: var(--shadow-1); border: 1px solid var(--line); margin: -1px 0; }
.side-nav a .icon { width: 18px; height: 18px; color: var(--ink-3); }
.side-nav a.is-active .icon { color: var(--green); }
.side-nav .count { margin-left: auto; font-size: .78rem; font-weight: 700; color: var(--ink-3); }

/* Onglets / filtres segmentés */
.tabs {
    display: inline-flex;
    gap: 4px;
    padding: 4px;
    background: var(--line-soft);
    border-radius: 13px;
    flex-wrap: wrap;
}

.tabs a, .tabs button {
    padding: 7px 14px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: var(--ink-2);
    font-weight: 600;
    font-size: .88rem;
    cursor: pointer;
}

.tabs a:hover, .tabs button:hover { color: var(--ink); }
.tabs .is-active { background: var(--paper); color: var(--ink); box-shadow: var(--shadow-1); }

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    margin-top: 40px;
    flex-wrap: wrap;
}

.pagination a, .pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border-radius: 11px;
    border: 1px solid var(--line);
    background: var(--paper);
    color: var(--ink-2);
    font-weight: 600;
    font-size: .92rem;
}

.pagination a:hover { border-color: #C7CCDA; color: var(--ink); }
.pagination .is-active { background: var(--ink); border-color: var(--ink); color: #fff; }

/* Panneau dépliable (avis, partage) */
.drawer {
    margin-top: 12px;
    padding: 18px;
    border-radius: var(--r-md);
    background: var(--canvas);
    border: 1px solid var(--line-soft);
}

.share-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.share-links a, .share-links button { min-height: 36px; }
.copy-row { display: flex; gap: 8px; }
.copy-row input { min-height: 40px; font-size: .88rem; }

/* Écran à deux volets (authentification) */
.auth {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    min-height: calc(100vh - var(--nav-h));
}

.auth-aside {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 56px 8%;
    overflow: hidden;
    border-right: 1px solid var(--line);
}

.auth-aside h1 {
    font-family: var(--font-serif);
    font-weight: 500;
    font-size: clamp(2.2rem, 1.6rem + 2vw, 3.2rem);
    letter-spacing: -.02em;
    line-height: 1.05;
    max-width: 14ch;
    margin-bottom: 18px;
}

.auth-aside .lead { max-width: 40ch; }

.auth-main {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 24px;
    background: var(--paper);
}

.auth-card { width: 100%; max-width: 420px; }
.auth-card h2 { font-size: 1.75rem; margin-bottom: 6px; }
.auth-card > .lead { font-size: .98rem; margin-bottom: 26px; }

.divider-text {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 22px 0;
    color: var(--ink-3);
    font-size: .85rem;
}

.divider-text::before, .divider-text::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/*
--------------------------------------------------------------------------------
TEXTE LONG (légal, à propos)
--------------------------------------------------------------------------------
*/

.prose { max-width: 72ch; font-size: 1.02rem; line-height: 1.7; color: #2A2E4E; }
.prose h2 { margin: 2em 0 .6em; font-size: 1.4rem; }
.prose h3 { margin: 1.6em 0 .5em; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin: .35em 0; }
.prose a { text-decoration: underline; text-underline-offset: 3px; }

/*
--------------------------------------------------------------------------------
RESPONSIVE
--------------------------------------------------------------------------------
*/

@media (max-width: 1080px) {
    .split, .split-left { grid-template-columns: 1fr; }
    .workspace { grid-template-columns: 1fr; gap: 20px; }
    .side-nav { position: static; flex-direction: row; overflow-x: auto; padding-bottom: 6px; scrollbar-width: none; }
    .side-nav-title { display: none; }
    .side-nav a { white-space: nowrap; }
    .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .sticky { position: static; }
}

@media (max-width: 900px) {
    .nav { flex-wrap: wrap; gap: 0 12px; }
    .nav-burger {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 42px;
        height: 42px;
        margin-left: auto;
        border-radius: 12px;
        border: 1px solid var(--line);
        background: var(--paper);
        cursor: pointer;
    }
    .nav-links, .nav-right { display: none; }
    .nav-toggle:checked ~ .nav-links,
    .nav-toggle:checked ~ .nav-right {
        display: flex;
        flex-basis: 100%;
        flex-direction: column;
        align-items: stretch;
        padding: 4px 0 12px;
    }
    .nav-toggle:checked ~ .nav-right { flex-direction: row; flex-wrap: wrap; padding-top: 0; padding-bottom: 16px; }
    .nav-link { padding: 12px 14px; border-radius: 12px; }
    .account-menu { left: 0; right: auto; }
    .auth { grid-template-columns: 1fr; min-height: 0; }
    .auth-aside { padding: 40px 24px; border-right: 0; border-bottom: 1px solid var(--line); }
    .auth-aside .lead { display: none; }
}

@media (max-width: 720px) {
    .container { padding: 0 16px; }
    .page { padding-top: 24px; padding-bottom: 56px; }
    .grid-2, .grid-3, .grid-4, .field-row, .field-row-3 { grid-template-columns: 1fr; }
    .panel { padding: 20px; }
    .panel-lg, .form-section { padding: 22px 18px; }
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; }
    .footer-grid > :first-child { grid-column: 1 / -1; }
    .section { padding: 52px 0; }
    .shelf { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 16px; }
    .cover-md { font-size: 12px; }
    .mrow { grid-template-columns: 52px minmax(0, 1fr); }
    .mrow .cover { width: 52px; font-size: 5px; }
    .mrow-side { grid-column: 2; justify-content: flex-start; }
    .dl > div { grid-template-columns: 1fr; gap: 2px; }
    .page-head-actions .btn { flex: 1; }
    table th, table td { padding: 11px 14px; }
    .searchbar { padding-left: 14px; }
    .searchbar .btn span { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
        scroll-behavior: auto !important;
    }
}
