:root {
    --ink: #171717;
    --muted: #666;
    --line: #dedede;
    --paper: #f6f4ef;
    --white: #fff;
    --accent: #ef3c2f;
    --accent-dark: #c92a20;
    font-family: Arial, Helvetica, sans-serif;
    color: var(--ink);
    background: var(--paper);
}

* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; }
a { color: inherit; }

.site-header {
    min-height: 72px;
    padding: 12px clamp(18px, 5vw, 64px);
    background: var(--white);
    border-bottom: 1px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
}
.brand { display: flex; align-items: center; gap: 22px; max-width: 100%; text-decoration: none; }
.brand img { display: block; width: 170px; height: auto; flex-shrink: 0; }
.brand-title { min-width: 0; color: var(--accent); font-size: clamp(1.1rem, 1.7vw, 1.5rem); font-weight: 800; line-height: 1.25; letter-spacing: .1em; text-transform: uppercase; }
.site-header nav { flex-wrap: wrap; margin-left: auto; }
.nav-toggle { display: none; }
nav { display: flex; align-items: center; gap: 18px; }
nav a, .link-button { text-decoration: none; font-weight: 700; }
.inline-form { margin: 0; }
.link-button { border: 0; background: transparent; padding: 0; cursor: pointer; font-size: inherit; }

@media (max-width: 760px) {
    .site-header.nav-ready { align-items: center; gap: 14px; }
    .nav-ready .brand { flex: 1; min-width: 0; gap: 12px; }
    .nav-ready .brand img { width: 100px; }
    .nav-ready .brand-title { font-size: .9rem; letter-spacing: .04em; overflow-wrap: anywhere; }
    .nav-ready .nav-toggle { display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 5px; flex-shrink: 0; width: 44px; height: 44px; padding: 10px; color: var(--ink); background: var(--white); border: 1px solid var(--line); border-radius: 4px; cursor: pointer; }
    .nav-toggle span { display: block; width: 22px; height: 2px; background: currentColor; }
    .nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
    .nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
    .nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
    .nav-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
    .nav-ready #primary-navigation { display: none; flex-basis: 100%; flex-direction: column; align-items: stretch; gap: 8px; margin: 0; padding-top: 14px; border-top: 1px solid var(--line); }
    .nav-ready.nav-open #primary-navigation { display: flex; }
    #primary-navigation > a, #primary-navigation .link-button { display: flex; align-items: center; min-height: 44px; padding: 10px 12px; }
    #primary-navigation .link-button { width: 100%; text-align: left; }
    #primary-navigation .language-switcher { display: flex; flex-wrap: wrap; gap: 16px; margin: 0; padding: 8px 12px; border: 0; }
    #primary-navigation .language-switcher > * { display: inline-flex; align-items: center; min-height: 44px; }
}

.page { width: min(100% - 36px, 980px); margin: 0 auto; padding: clamp(40px, 8vw, 90px) 0; }
.hero { max-width: 760px; }
.home-portfolio { max-width: 760px; margin-top: 56px; }
.home-portfolio h2 { font-size: clamp(1.5rem, 3vw, 2rem); line-height: 1.2; }
.home-portfolio p { max-width: 620px; color: var(--muted); font-size: 1.2rem; line-height: 1.6; }
h1 { margin: 0 0 18px; font-size: clamp(2.2rem, 7vw, 4.8rem); line-height: .98; letter-spacing: -.045em; }
.form-card h1, .account-heading h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { margin-top: 0; }
.hero > p:not(.eyebrow) { max-width: 620px; color: var(--muted); font-size: 1.2rem; line-height: 1.6; }
.eyebrow { margin: 0 0 12px; color: var(--accent); font-size: .78rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.muted, .field-help, .form-footer { color: var(--muted); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }

.button {
    display: inline-flex;
    justify-content: center;
    padding: 13px 20px;
    border: 1px solid var(--accent);
    border-radius: 4px;
    background: var(--accent);
    color: var(--white);
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
}
.button:hover { background: var(--accent-dark); border-color: var(--accent-dark); }
.button-secondary { background: transparent; color: var(--ink); border-color: var(--ink); }
.button-secondary:hover { background: var(--ink); }
.button-small { padding: 9px 13px; }
.button-full { width: 100%; font-size: 1rem; }

.card { padding: clamp(24px, 5vw, 48px); background: var(--white); border: 1px solid var(--line); border-radius: 6px; }
.form-card { max-width: 570px; margin: 0 auto; }
.proof-workflow .form-card + .form-card { margin-top: 24px; }
.proof-workflow .button { text-align: center; white-space: normal; }
.proof-workflow .field-help { margin-bottom: 18px; }
.field { margin: 22px 0; }
.field label { display: block; margin-bottom: 7px; font-weight: 700; }
.field input, .field select, .field textarea {
    width: 100%;
    min-height: 48px;
    padding: 10px 12px;
    border: 1px solid #aaa;
    border-radius: 3px;
    background: var(--white);
    font: inherit;
}
.field textarea { min-height: 90px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 3px solid rgba(239, 60, 47, .2); border-color: var(--accent); }
.field-error { display: block; margin-top: 6px; color: #a51f18; font-size: .9rem; }
.field-help { margin: -15px 0 0; font-size: .85rem; }
.checkbox { display: block; margin: 18px 0 24px; }
.form-footer { margin: 24px 0 0; font-size: .94rem; text-align: center; }

.activation-notice {
    margin: -6px 0 24px;
    padding: 18px;
    border-left: 4px solid var(--accent);
    background: var(--paper);
}
.activation-notice strong { display: block; margin-bottom: 7px; }
.activation-notice p { margin: 0 0 14px; color: var(--muted); line-height: 1.45; }

.messages { margin-bottom: 24px; }
.message { padding: 13px 16px; background: var(--white); border-left: 4px solid var(--ink); }
.message-success { border-color: #2a7d46; }
.message-error { border-color: var(--accent); }

.account-heading { margin-bottom: 28px; }
.nia { display: inline-block; padding: 8px 12px; background: var(--ink); color: var(--white); font-family: ui-monospace, monospace; }
.details dl { margin: 0; }
.details dl div { padding: 15px 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: 1fr 2fr; gap: 20px; }
.details dt { color: var(--muted); }
.details dd { margin: 0; font-weight: 700; }

.artwork-form { max-width: 680px; }
.artwork-form fieldset { margin: 32px 0; padding: 0; border: 0; }
.artwork-form legend { margin-bottom: 8px; font-size: 1.25rem; font-weight: 800; }
.artwork-form legend span {
    display: inline-grid; place-items: center; width: 30px; height: 30px; margin-right: 8px;
    border-radius: 50%; background: var(--ink); color: var(--white); font-size: .9rem;
}
.review-box { padding: 20px !important; background: var(--paper); border-left: 4px solid var(--accent) !important; }
.review-box p { margin: 8px 0; line-height: 1.5; }
.success-grid, .passport-grid { display: grid; grid-template-columns: minmax(260px, 1fr) 1.25fr; gap: clamp(28px, 6vw, 70px); align-items: start; }
.publication-panel { align-items: center; display: flex; gap: 1.25rem; justify-content: space-between; margin-bottom: 1.5rem; }
.publication-panel p:last-child { margin-bottom: 0; }
.publication-panel form { flex: 0 0 auto; }
.artwork-cover { display: block; width: 100%; max-height: 620px; object-fit: cover; border-radius: 6px; background: #e5e5e5; }
.privacy-label { display: block; width: fit-content; margin: 22px 0; padding: 7px 10px; border: 1px solid var(--line); border-radius: 999px; font-weight: 800; }
.passport-heading, .portfolio-heading { display: flex; justify-content: space-between; gap: 24px; align-items: end; margin-bottom: 34px; }
.passport-heading .privacy-label { flex: 0 0 auto; margin: 0; }
.passport-details { padding: clamp(22px, 4vw, 38px); }
.passport-details small { color: var(--muted); font-weight: 400; }
.back-link { margin: -18px 0 28px; }
.back-link a { color: var(--muted); font-weight: 700; text-decoration: none; }
.back-link a:hover { color: var(--ink); }
.artwork-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 22px; }
.artwork-card { overflow: hidden; background: var(--white); border: 1px solid var(--line); border-radius: 6px; text-decoration: none; }
.artwork-card img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.artwork-card div { padding: 18px; }
.artwork-card h2 { margin: 0 0 7px; font-size: 1.2rem; }
.artwork-card p { margin: 0 0 14px; color: var(--muted); }
.artwork-card .artwork-author { margin-bottom: 4px; color: var(--ink); font-weight: 700; }
.artwork-card .artwork-type { margin-bottom: 14px; }
.artwork-card span { font-family: ui-monospace, monospace; font-size: .78rem; }
.empty-state { text-align: center; }
.portfolio-intro { max-width: 590px; margin: 0; color: var(--muted); line-height: 1.55; }
.dashboard { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 30px; }
.metric { min-height: 128px; padding: 20px; background: var(--white); border: 1px solid var(--line); border-radius: 6px; text-decoration: none; }
.metric[href]:hover { border-color: var(--ink); }
.metric strong { display: block; margin-bottom: 10px; font-size: 2rem; line-height: 1; }
.metric span { color: var(--muted); font-size: .9rem; line-height: 1.35; }
.portfolio-tabs { margin-bottom: 20px; padding-bottom: 2px; overflow-x: auto; border-bottom: 1px solid var(--line); gap: 0; }
.portfolio-tabs a, .portfolio-tabs .future-tab { flex: 0 0 auto; padding: 12px 15px; color: var(--muted); text-decoration: none; font-size: .9rem; font-weight: 700; border-bottom: 3px solid transparent; }
.portfolio-tabs a:hover { color: var(--ink); }
.portfolio-tabs a.active { color: var(--ink); border-color: var(--accent); }
.portfolio-tabs a span { display: inline-grid; place-items: center; min-width: 21px; height: 21px; margin-left: 4px; padding: 0 5px; border-radius: 12px; background: #e9e7e1; font-size: .72rem; }
.portfolio-tabs .future-tab { opacity: .42; cursor: not-allowed; }
.portfolio-filters { display: flex; align-items: center; gap: 10px; margin-bottom: 26px; }
.portfolio-filters label:first-of-type { flex: 1; }
.portfolio-filters input, .portfolio-filters select { width: 100%; min-height: 44px; padding: 9px 11px; border: 1px solid #aaa; border-radius: 3px; background: var(--white); font: inherit; }
.portfolio-filters .button { min-height: 44px; padding-block: 9px; }
.reset-link { color: var(--muted); font-size: .9rem; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.role-labels { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 12px; }
.role-labels span { padding: 4px 7px; border-radius: 3px; background: var(--paper); font-family: inherit; font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
.artwork-card .nio-small { font-family: ui-monospace, monospace; font-size: .78rem; }
.passport-section { margin-top: 42px; }
.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin-bottom: 18px; }
.section-heading h2 { margin-bottom: 0; font-size: clamp(1.55rem, 4vw, 2.2rem); }
.section-heading .eyebrow { margin-bottom: 7px; }
.record-list { display: grid; gap: 14px; }
.record-card, .section-empty { padding: 22px; background: var(--white); border: 1px solid var(--line); border-radius: 6px; }
.record-card h3 { margin: 12px 0 8px; font-size: 1.16rem; }
.record-card > p { line-height: 1.55; }
.record-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; color: var(--muted); font-size: .78rem; font-weight: 700; }
.record-meta span:first-child { color: var(--ink); }
.record-meta .status-label { padding: 5px 8px; border-radius: 999px; background: #e8f3eb; color: #23683a; text-transform: uppercase; letter-spacing: .04em; }
.compact-details { margin: 14px 0 0; }
.compact-details div { display: grid; grid-template-columns: 100px 1fr; gap: 12px; padding: 6px 0; }
.compact-details dt { color: var(--muted); }
.compact-details dd { margin: 0; font-weight: 700; }
.proof-action { margin-bottom: 8px; font-weight: 800; }
.record-byline { margin: 0; color: var(--muted); font-size: .82rem; }
.section-empty { color: var(--muted); }
.section-empty p { margin: 0; }

@media (max-width: 620px) {
    .site-header { align-items: flex-start; }
    .brand { gap: 14px; }
    .brand img { width: 130px; }
    .brand-title { font-size: 1rem; letter-spacing: .06em; overflow-wrap: anywhere; }
    nav { gap: 11px; font-size: .88rem; }
    .page { padding-top: 42px; }
    .details dl div { grid-template-columns: 1fr; gap: 5px; }
    .success-grid, .passport-grid { grid-template-columns: 1fr; }
    .publication-panel { align-items: stretch; flex-direction: column; }
    .passport-heading, .portfolio-heading { align-items: flex-start; flex-direction: column; }
    .dashboard { grid-template-columns: repeat(2, 1fr); }
    .portfolio-filters { align-items: stretch; flex-direction: column; }
    .portfolio-filters label { width: 100%; }
    .section-heading { align-items: flex-start; flex-direction: column; }
    .section-heading .button { width: 100%; }
}

.pending-transfer { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.pending-transfer p { margin-bottom: 0; color: var(--muted); }
.transfer-mode-block { padding: 14px 18px; margin: 16px 0; border-left: 3px solid var(--line); background: var(--paper); }
.transfer-mode-block .field:first-child { margin-top: 8px; }
@media (max-width: 620px) { .pending-transfer { align-items: stretch; flex-direction: column; } .pending-transfer .button { width: 100%; } }

.transfer-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; }
.transfer-actions form { margin: 0; }
@media (max-width: 620px) { .transfer-actions { width: 100%; } .transfer-actions form, .transfer-actions .button { width: 100%; } }


/* J8 — Mandats */
.mandate-heading { max-width: 760px; }
.mandate-form { max-width: 720px; }
.mandate-form .field { margin-bottom: 20px; }
.mandate-form .field > label,
.mandate-form .field > label:first-child { display: block; margin-bottom: 7px; font-weight: 800; }
.mandate-form .field input,
.mandate-form .field select { width: 100%; min-height: 44px; padding: 9px 11px; border: 1px solid #aaa; border-radius: 3px; background: var(--white); font: inherit; }
.mandate-grid { gap: 18px; }
.mandate-documentary-note { display: grid; gap: 4px; margin: 4px 0 22px; padding: 14px 16px; border-left: 3px solid var(--line); background: var(--paper); line-height: 1.45; }
.mandate-documentary-note span { color: var(--muted); font-size: .92rem; }
.mandate-rights { margin: 8px 0 24px; padding: 20px; border: 1px solid var(--line); border-radius: 6px; }
.mandate-rights legend { padding: 0 8px; font-size: 1.05rem; font-weight: 800; }
.mandate-rights-help { margin: 0 0 14px; color: var(--muted); font-size: .9rem; }
.mandate-rights-list { display: grid; gap: 9px; }
.mandate-check { display: flex; align-items: flex-start; gap: 10px; padding: 8px 10px; border-radius: 4px; cursor: pointer; }
.mandate-check:hover { background: var(--paper); }
.mandate-check input { flex: 0 0 auto; width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--accent); }
.mandate-check span { line-height: 1.4; }
.mandate-actions { display: flex; flex-wrap: wrap; gap: 10px; }

@media (max-width: 620px) {
    .mandate-grid { grid-template-columns: 1fr; gap: 0; }
    .mandate-rights { padding: 16px; }
    .mandate-actions { flex-direction: column; }
    .mandate-actions .button { width: 100%; text-align: center; }
}

/* J10.2 — Redesign du Passeport : lecture en trois niveaux + actions contextuelles */
.passport-heading-redesign { margin-bottom: 18px; }
.passport-heading-main { width: 100%; }
.passport-authors { margin: -6px 0 0; font-size: 1.05rem; font-weight: 800; }
.passport-authors small { color: var(--muted); font-weight: 500; }
.passport-heading-meta { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 16px; }
.passport-heading-meta .privacy-label { margin: 0; }
.passport-visibility-control { display: inline-flex; align-items: center; gap: 9px; min-height: 34px; padding: 4px 6px 4px 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--white); }
.passport-visibility-text { font-size: .84rem; font-weight: 800; }
.visibility-form { margin: 0; }
.visibility-switch { position: relative; width: 42px; height: 24px; padding: 0; border: 0; border-radius: 999px; background: #c9c9c9; cursor: pointer; transition: background .15s ease; }
.visibility-switch span { position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--white); box-shadow: 0 1px 3px rgba(0,0,0,.22); transition: transform .15s ease; }
.visibility-switch.is-on { background: var(--ink); }
.visibility-switch.is-on span { transform: translateX(18px); }
.visibility-switch:focus-visible { outline: 3px solid rgba(239, 60, 47, .25); outline-offset: 2px; }
.passport-hero { display: grid; grid-template-columns: minmax(300px, .95fr) minmax(340px, 1.15fr); gap: clamp(30px, 5vw, 64px); align-items: start; margin-bottom: 34px; }
.passport-core { display: grid; gap: 22px; }
.passport-core-block { padding: clamp(22px, 3vw, 34px); background: var(--white); border: 1px solid var(--line); border-radius: 6px; }
.passport-core-block > .eyebrow { margin-bottom: 13px; }
.passport-facts { margin: 0; }
.passport-facts > div { display: grid; grid-template-columns: minmax(120px, .8fr) 1.4fr; gap: 18px; padding: 12px 0; border-top: 1px solid var(--line); }
.passport-facts > div:first-child { border-top: 0; padding-top: 0; }
.passport-facts dt { color: var(--muted); }
.passport-facts dd { margin: 0; font-weight: 800; }
.passport-facts small { color: var(--muted); font-weight: 400; }
.fact-status { display: inline-flex; padding: 4px 8px; border-radius: 999px; background: var(--paper); font-size: .9rem; }
.section-heading-compact { align-items: baseline; margin-bottom: 12px; }
.section-heading-compact h2 { font-size: clamp(1.35rem, 3vw, 1.8rem); }
.text-action { color: var(--muted); font-size: .86rem; font-weight: 800; text-decoration: none; }
.text-action:hover { color: var(--ink); }
.description-list { display: grid; gap: 14px; }
.description-entry { padding-top: 14px; border-top: 1px solid var(--line); }
.description-entry:first-child { padding-top: 0; border-top: 0; }
.description-entry h3 { margin: 0 0 5px; font-size: .92rem; text-transform: uppercase; letter-spacing: .03em; }
.description-entry p { margin: 0; line-height: 1.55; }
.inline-alert { display: inline-block; margin-top: 8px; font-size: .78rem; font-weight: 800; color: var(--accent); }
.muted-copy { margin: 0; color: var(--muted); line-height: 1.5; }

/* Alpha 1.5.3c — restitution des exemplaires d’une édition limitée */
.edition-passports { margin-top: 34px; margin-bottom: 34px; }
.edition-passports-count { display: inline-grid; place-items: center; min-width: 34px; height: 34px; padding: 0 9px; border-radius: 999px; background: var(--paper); font-weight: 800; }
.edition-passports-list { overflow: hidden; background: var(--white); border: 1px solid var(--line); border-radius: 6px; }
.edition-passport-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 18px 20px; border-top: 1px solid var(--line); }
.edition-passport-row:first-child { border-top: 0; }
.edition-passport-identity { display: grid; gap: 5px; min-width: 0; }
.edition-passport-identity strong { font-size: 1rem; }
.edition-passport-identity .nio-small { color: var(--muted); font-family: ui-monospace, monospace; font-size: .78rem; overflow-wrap: anywhere; }

.passport-actions { margin: 34px 0 48px; padding: 24px; background: var(--paper); border: 1px solid var(--line); border-radius: 6px; }
.passport-actions .section-heading-compact { margin-bottom: 14px; }
.action-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; }
.action-grid + .action-grid { margin-top: 10px; }
.action-grid-primary, .action-grid-passport { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.action-grid-secondary { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.action-grid-primary .action-button { min-height: 48px; }
.action-grid-secondary .action-button { min-height: 42px; background: transparent; color: var(--muted); font-size: .84rem; }
.action-grid-secondary .action-button:hover { background: var(--white); color: var(--ink); }
.action-grid form { margin: 0; }
.action-button { display: flex; align-items: center; justify-content: center; min-height: 46px; width: 100%; padding: 10px 14px; border: 1px solid var(--line); border-radius: 4px; background: var(--white); color: var(--ink); font: inherit; font-size: .9rem; font-weight: 800; text-align: center; text-decoration: none; cursor: pointer; }
.action-button:hover { border-color: var(--ink); }
.action-button-primary { background: var(--ink); border-color: var(--ink); color: var(--white); }
.action-button-important { border-color: var(--accent); color: var(--accent); }
.action-button-important:hover { background: var(--accent); color: var(--white); }

.trust-section { margin-top: 0; padding: clamp(24px, 4vw, 38px); background: var(--white); border: 1px solid var(--line); border-radius: 6px; }
.trust-metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; margin: 4px 0 24px; background: var(--line); border: 1px solid var(--line); }
.trust-metrics > div { min-height: 104px; padding: 18px; background: var(--paper); }
.trust-metrics strong { display: block; margin-bottom: 8px; font-size: clamp(1.8rem, 4vw, 2.5rem); line-height: 1; }
.trust-metrics span { color: var(--muted); font-size: .84rem; font-weight: 700; }
.proof-preview-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 16px; }
.proof-preview { padding: 18px; border: 1px solid var(--line); border-radius: 5px; }
.proof-preview h3 { margin: 10px 0 6px; font-size: 1.02rem; }
.trust-pill { display: inline-flex; padding: 4px 7px; border-radius: 999px; background: #e8f3eb; color: #23683a; font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
.trust-pill-alert { background: #f7e7e7; color: #8a2f2f; }

.secondary-section { margin-top: 24px; }
.passport-disclosure { border: 1px solid var(--line); border-radius: 6px; background: var(--white); overflow: hidden; }
.passport-disclosure + .passport-disclosure { margin-top: 10px; }
.passport-disclosure > summary { display: flex; align-items: center; justify-content: space-between; gap: 18px; min-height: 64px; padding: 16px 18px; cursor: pointer; list-style: none; font-weight: 800; }
.passport-disclosure > summary::-webkit-details-marker { display: none; }
.passport-disclosure > summary::after { content: '+'; flex: 0 0 auto; width: 28px; height: 28px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; font-size: 1.2rem; line-height: 1; }
.passport-disclosure[open] > summary::after { content: '−'; }
.passport-disclosure > summary > span:first-child { display: grid; gap: 2px; }
.passport-disclosure > summary .eyebrow { margin: 0 0 2px; }
.passport-disclosure > summary strong { font-size: 1.04rem; }
.passport-disclosure > summary small { color: var(--muted); font-weight: 500; }
.disclosure-count { margin-left: auto; padding: 4px 8px; border-radius: 999px; background: var(--paper); color: var(--muted); font-size: .78rem; }
.disclosure-content { padding: 0 18px 18px; border-top: 1px solid var(--line); }
.disclosure-content.record-list { padding-top: 18px; }
.section-heading-inside { align-items: center; padding-top: 18px; }
.proofs-disclosure { margin-top: 8px; }
.proofs-disclosure > summary { color: var(--ink); }
.inline-actions { display: flex; flex-wrap: wrap; gap: 7px; }

.history-hub { margin-top: 48px; }
.history-disclosures { display: grid; gap: 10px; }
.history-disclosures .passport-disclosure > summary { min-height: 72px; }

@media (max-width: 1000px) {
    .action-grid-secondary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
    .passport-hero { grid-template-columns: 1fr; gap: 20px; }
    .passport-core { gap: 14px; }
    .passport-facts > div { grid-template-columns: 1fr; gap: 4px; }
    .trust-metrics { grid-template-columns: repeat(2, 1fr); }
    .proof-preview-list { grid-template-columns: 1fr; }
    .action-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
    .passport-actions, .trust-section, .passport-core-block { padding: 18px; }
    .action-grid { grid-template-columns: 1fr; }
    .trust-metrics > div { min-height: 86px; padding: 14px; }
    .passport-disclosure > summary { padding: 14px; }
    .disclosure-content { padding: 0 14px 14px; }
}

/* Enregistrement d’une œuvre : photo directe ou image existante */
.image-source-field { position: relative; }
.image-source-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.image-source-actions .button { width: 100%; min-height: 48px; align-items: center; }
.image-source-input {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    min-height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
    opacity: 0;
    overflow: hidden;
    pointer-events: none;
}
.image-source-name { margin: 10px 0 0; color: var(--muted); font-size: .9rem; }
.image-source-help { margin-top: -10px; line-height: 1.45; }
@media (max-width: 620px) {
    .image-source-actions { grid-template-columns: 1fr; }
}


.image-preview {
    margin-top: 14px;
    padding: 12px;
    border: 1px solid var(--border);
    background: #fff;
}
.image-preview[hidden] { display: none; }
.image-preview img {
    display: block;
    width: 100%;
    max-height: 420px;
    object-fit: contain;
    background: var(--paper);
}
.image-preview-actions {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
    margin-top: 10px;
}
.image-preview-actions .button { min-height: 42px; }
.button-quiet {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--border);
}
.form-final-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}
.form-final-actions .button {
    text-align: center;
    justify-content: center;
}
@media (max-width: 620px) {
    .image-preview-actions,
    .form-final-actions {
        grid-template-columns: 1fr;
    }
}


/* Mini-éditeur image */
.image-preview-actions {
    grid-template-columns: 1.2fr 1fr auto;
}
.image-editor[hidden] { display: none; }
.image-editor {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: grid;
    place-items: center;
    padding: 18px;
}
.image-editor-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .72);
}
.image-editor-dialog {
    position: relative;
    z-index: 1;
    width: min(100%, 820px);
    max-height: calc(100vh - 36px);
    overflow: auto;
    padding: clamp(20px, 4vw, 32px);
    border-radius: 7px;
    background: var(--white);
    box-shadow: 0 24px 70px rgba(0, 0, 0, .28);
}
.image-editor-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
}
.image-editor-heading h2 {
    margin: 0;
    font-size: clamp(1.6rem, 4vw, 2.4rem);
}
.image-editor-close {
    flex: 0 0 auto;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: var(--white);
    color: var(--ink);
    font-size: 1.8rem;
    line-height: 1;
    cursor: pointer;
}
.image-editor-help {
    margin: 12px 0 18px;
    line-height: 1.45;
}
.image-editor-stage {
    display: grid;
    place-items: center;
    min-height: 260px;
    padding: 10px;
    overflow: hidden;
    background: #202020;
    border-radius: 4px;
}
.image-editor-stage canvas {
    display: block;
    max-width: 100%;
    max-height: 60vh;
    width: auto;
    height: auto;
    touch-action: none;
    cursor: move;
}
.image-editor-tools {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 20px;
    align-items: center;
    margin-top: 18px;
}
.image-editor-rotate {
    display: flex;
    gap: 8px;
}
.image-editor-straighten {
    display: grid;
    gap: 8px;
    font-weight: 700;
}
.image-editor-straighten span {
    display: flex;
    justify-content: space-between;
    gap: 12px;
}
.image-editor-straighten input {
    width: 100%;
    accent-color: var(--accent);
}
.image-editor-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
}
.image-editor-open { overflow: hidden; }

@media (max-width: 620px) {
    .image-preview-actions {
        grid-template-columns: 1fr;
    }
    .image-editor {
        padding: 0;
        align-items: stretch;
    }
    .image-editor-dialog {
        width: 100%;
        max-height: 100vh;
        border-radius: 0;
        padding: 18px;
    }
    .image-editor-stage {
        min-height: 220px;
    }
    .image-editor-stage canvas {
        max-height: 52vh;
    }
    .image-editor-tools {
        grid-template-columns: 1fr;
    }
    .image-editor-rotate {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }
    .image-editor-footer {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }
}

/* Alpha 1.5.1 — affichage Grille / Liste du Portefeuille */
.portfolio-display-toggle { display: flex; justify-content: flex-end; align-items: center; gap: 4px; margin: -8px 0 14px; }
.portfolio-display-toggle > span { margin-right: 6px; color: var(--muted); font-size: .82rem; font-weight: 700; }
.portfolio-display-toggle a { padding: 7px 10px; border: 1px solid var(--line); background: var(--white); color: var(--muted); text-decoration: none; font-size: .82rem; font-weight: 800; }
.portfolio-display-toggle a:first-of-type { border-radius: 4px 0 0 4px; }
.portfolio-display-toggle a:last-of-type { margin-left: -5px; border-radius: 0 4px 4px 0; }
.portfolio-display-toggle a.active { position: relative; border-color: var(--ink); color: var(--ink); }
.artwork-list--compact { display: grid; grid-template-columns: 1fr; gap: 10px; }
.artwork-list--compact .artwork-card { display: grid; grid-template-columns: 92px 1fr; align-items: stretch; min-height: 92px; }
.artwork-list--compact .artwork-card img { width: 92px; height: 100%; min-height: 92px; aspect-ratio: auto; object-fit: cover; }
.artwork-list--compact .artwork-card > div { padding: 12px 16px; }
.artwork-list--compact .role-labels { margin-bottom: 6px; }
.artwork-list--compact .artwork-card h2 { margin-bottom: 3px; font-size: 1.05rem; }
.artwork-list--compact .artwork-card p { display: inline; margin: 0 12px 0 0; font-size: .88rem; }
.artwork-list--compact .artwork-card .nio-small { display: block; margin-top: 6px; }
@media (max-width: 620px) {
    .portfolio-display-toggle { justify-content: flex-start; margin-top: 0; }
    .artwork-list--compact .artwork-card { grid-template-columns: 78px 1fr; min-height: 78px; }
    .artwork-list--compact .artwork-card img { width: 78px; min-height: 78px; }
}

/* Alpha 1.5.1 — affichage / masquage du mot de passe */
.password-field-wrap .field { margin-bottom: 7px; }
.password-toggle {
    display: inline-block;
    margin: 0 0 14px;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--muted);
    font: inherit;
    font-size: .84rem;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 2px;
    cursor: pointer;
}
.password-toggle:hover { color: var(--ink); }


@media (max-width: 620px) {
    .edition-passport-row { align-items: stretch; flex-direction: column; }
    .edition-passport-row .button { width: 100%; }
}
/* QR code du Passeport */
.qr-card { display: grid; grid-template-columns: minmax(220px, 320px) 1fr; gap: 30px; align-items: center; }
.qr-preview { display: flex; justify-content: center; align-items: center; padding: 18px; background: #fff; border: 1px solid var(--line); border-radius: 6px; }
.qr-preview img { display: block; width: 100%; max-width: 280px; height: auto; }
.qr-details h2 { margin-top: 0; }
.qr-url { overflow-wrap: anywhere; }
@media (max-width: 720px) { .qr-card { grid-template-columns: 1fr; } .qr-preview img { max-width: 240px; } }


/* Indicateur global d’activité — démo / bêta */
.activity-overlay[hidden] { display: none; }
.activity-overlay {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: grid;
    place-items: center;
    padding: 20px;
    background: rgba(246, 244, 239, .68);
    backdrop-filter: blur(1.5px);
}
.activity-indicator {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    max-width: min(90vw, 420px);
    padding: 14px 18px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--white);
    box-shadow: 0 12px 36px rgba(0, 0, 0, .14);
    font-weight: 800;
}
.activity-spinner {
    width: 20px;
    height: 20px;
    flex: 0 0 20px;
    border: 3px solid var(--line);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: activity-spin .75s linear infinite;
}
.activity-active { overflow: hidden; }
@keyframes activity-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
    .activity-spinner { animation-duration: 1.5s; }
}

/* Indicateur de chargement des images du Portefeuille et du Passeport */
.image-loading-frame {
    position: relative;
    overflow: hidden;
    background: #e5e5e5;
}
.image-loading-indicator {
    position: absolute;
    inset: 0;
    display: none;
    place-items: center;
    pointer-events: none;
    background: rgba(246, 244, 239, .58);
}
.image-loading-frame.is-loading .image-loading-indicator { display: grid; }
.image-loading-spinner {
    width: 26px;
    height: 26px;
    border: 3px solid rgba(80, 80, 80, .22);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: activity-spin .75s linear infinite;
}
.artwork-image-frame { margin: 0; padding: 0; }
.artwork-image-frame img { height: 100%; }
.artwork-list--compact .artwork-image-frame { width: 92px; min-height: 92px; }
.artwork-list--compact .artwork-image-frame img { width: 92px; min-height: 92px; }
@media (max-width: 620px) {
    .artwork-list--compact .artwork-image-frame { width: 78px; min-height: 78px; }
    .artwork-list--compact .artwork-image-frame img { width: 78px; min-height: 78px; }
}
@media (prefers-reduced-motion: reduce) {
    .image-loading-spinner { animation-duration: 1.5s; }
}

.account-email-change { margin-top: 20px; }
.account-email-change form { max-width: 560px; }
.account-email-change .muted { margin-bottom: 0; line-height: 1.5; }

.portfolio-create-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; }
.portfolio-history-actions { display: flex; justify-content: flex-end; margin: -14px 0 30px; }
.form-subsection { margin: 24px 0 20px; padding: 18px; background: var(--paper); border-left: 3px solid var(--accent); }
.form-subsection .eyebrow { margin-bottom: 12px; }
@media (max-width: 760px) {
    .portfolio-create-actions { width: 100%; flex-direction: column; }
    .portfolio-create-actions .button { width: 100%; }
    .portfolio-history-actions { justify-content: stretch; margin-top: -10px; }
    .portfolio-history-actions .button { width: 100%; }
}

.readonly-artwork-image {
    width: 100%;
    max-width: 280px;
    border: 1px solid #d7d2ca;
    background: #f3f1ed;
    padding: 8px;
}
.readonly-artwork-image img {
    display: block;
    width: 100%;
    height: auto;
}
.artwork-form input:disabled,
.artwork-form select:disabled,
.artwork-form textarea:disabled {
    background: #efede8;
    color: #666;
    cursor: not-allowed;
    opacity: 1;
}

.language-switcher {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    margin-left: .35rem;
    padding-left: .65rem;
    border-left: 1px solid currentColor;
    font-size: .82rem;
}
.language-switcher a,
.language-switcher .language-current {
    white-space: nowrap;
}
.language-switcher .language-current {
    font-weight: 700;
}
@media (max-width: 720px) {
    .language-switcher {
        width: 100%;
        justify-content: flex-end;
        margin-left: 0;
        padding-left: 0;
        border-left: 0;
    }
}
