/* HARD DÉCO — Lot 9I-3 : création et édition dans la fiche Artiste dédiée. */
.artist-page-toolbar .inner { gap: 12px; }
.artist-page-toolbar .artist-page-breadcrumb { min-width: 0; flex: 1; }
.artist-page-toolbar .artist-page-breadcrumb span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.artist-page-toolbar .artist-page-actions,
.artist-page-view-actions,
.artist-page-editor-actions { display: flex; align-items: center; gap: 8px; }
.artist-page-actions[hidden],
.artist-page-view-actions[hidden],
.artist-page-editor-actions[hidden] { display: none !important; }
.artist-page { --artist-accent: var(--accent, #f59e0b); max-width: 1420px; margin: 0 auto; padding-bottom: 48px; }
.artist-page-content { display: grid; gap: 12px; }
.artist-page-kpis[hidden], .artist-page-tabs[hidden] { display: none; }
.artist-page-state { min-height: 240px; display: grid; place-content: center; justify-items: center; gap: 12px; color: var(--muted, #64748b); }
.artist-page-state[hidden] { display: none; }
.artist-page-spinner { width: 28px; height: 28px; border: 3px solid color-mix(in srgb, var(--artist-accent) 20%, transparent); border-top-color: var(--artist-accent); border-radius: 50%; animation: artist-spin .75s linear infinite; }
.artist-page-error svg { width: 42px; height: 42px; color: var(--artist-accent); }
.artist-page-error h1, .artist-page-error p { margin: 0; }
@keyframes artist-spin { to { transform: rotate(360deg); } }

.artist-page-hero { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr) minmax(280px, auto); align-items: center; gap: 18px; min-height: 118px; padding: 22px 24px; overflow: hidden; }
.artist-page-accent { position: absolute; inset: 0 auto 0 0; width: 4px; background: var(--artist-accent); }
.artist-page-avatar { width: 58px; height: 58px; display: grid; place-items: center; overflow: hidden; border-radius: 50%; background: color-mix(in srgb, var(--artist-accent) 13%, var(--panel, #fff)); color: var(--artist-accent); font-size: 1.35rem; font-weight: 750; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--artist-accent) 25%, transparent); }
.artist-page-avatar img { width: 100%; height: 100%; object-fit: cover; }
.artist-page-heading { min-width: 0; }
.artist-page-kicker { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; margin-bottom: 5px; color: var(--muted, #64748b); font-size: .72rem; font-weight: 700; letter-spacing: .045em; text-transform: uppercase; }
.artist-page-role, .artist-page-status { padding: 4px 8px; border-radius: 999px; letter-spacing: 0; text-transform: none; }
.artist-page-role { color: #a85c00; background: color-mix(in srgb, var(--artist-accent) 12%, var(--panel, #fff)); }
.artist-page-status { color: #475569; background: var(--surface-subtle, #f1f5f9); }
.artist-page-heading h1 { margin: 0; overflow-wrap: anywhere; color: var(--foreground, #0f172a); font-size: clamp(1.45rem, 2.3vw, 2rem); line-height: 1.1; }
.artist-page-heading p { margin: 8px 0 0; color: var(--muted, #64748b); }
.artist-page-hero-meta { display: grid; gap: 7px; min-width: 0; }
.artist-page-hero-meta > * { min-width: 0; display: flex; align-items: center; gap: 9px; padding: 8px 10px; border-radius: 10px; color: var(--foreground, #0f172a); background: var(--surface-subtle, #f8fafc); text-decoration: none; }
.artist-page-hero-meta svg { width: 16px; color: var(--artist-accent); flex: 0 0 auto; }
.artist-page-hero-meta span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .84rem; }

.artist-page-editor { padding: 0; overflow: hidden; border-color: color-mix(in srgb, var(--artist-accent) 38%, var(--border, #e2e8f0)); }
.artist-page-editor[hidden] { display: none; }
.artist-editor-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 18px; border-bottom: 1px solid var(--border, #e2e8f0); background: color-mix(in srgb, var(--artist-accent) 5%, var(--panel, #fff)); }
.artist-editor-header > div { display: flex; align-items: center; gap: 11px; }
.artist-editor-icon { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 11px; color: var(--artist-accent); background: color-mix(in srgb, var(--artist-accent) 13%, var(--panel, #fff)); }
.artist-editor-icon svg, .artist-editor-block header svg { width: 18px; }
.artist-editor-header h2, .artist-editor-block h3 { margin: 0; color: var(--foreground, #0f172a); }
.artist-editor-header h2 { font-size: 1rem; }
.artist-editor-header p { margin: 3px 0 0; color: var(--muted, #64748b); font-size: .76rem; }
.artist-editor-header > button[hidden] { display: none; }
#artistPageForm { display: grid; gap: 14px; padding: 18px; }
.artist-editor-block { display: grid; gap: 12px; padding: 15px; border: 1px solid var(--border, #e2e8f0); border-radius: 12px; background: var(--panel, #fff); }
.artist-editor-block[hidden] { display: none; }
.artist-editor-block > header { display: flex; align-items: center; gap: 8px; color: var(--artist-accent); }
.artist-editor-block h3 { font-size: .86rem; }
.artist-editor-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
.artist-editor-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.artist-editor-wide { grid-column: 1 / -1; }
.artist-editor-block label { min-width: 0; display: grid; gap: 6px; color: var(--muted, #64748b); font-size: .72rem; font-weight: 650; }
.artist-editor-block input:not([type="checkbox"]), .artist-editor-block select, .artist-editor-block textarea { width: 100%; min-height: 40px; padding: 9px 11px; box-sizing: border-box; border: 1px solid var(--border, #cbd5e1); border-radius: 9px; background: var(--panel, #fff); color: var(--foreground, #0f172a); font: inherit; font-size: .82rem; outline: none; }
.artist-editor-block textarea { min-height: 100px; resize: vertical; }
.artist-editor-block input:focus, .artist-editor-block select:focus, .artist-editor-block textarea:focus { border-color: var(--artist-accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--artist-accent) 13%, transparent); }
.artist-editor-block [aria-invalid="true"] { border-color: #dc2626 !important; box-shadow: 0 0 0 3px rgba(220, 38, 38, .1) !important; }
.artist-editor-switches { display: flex; flex-wrap: wrap; gap: 8px; }
.artist-editor-switches label { min-height: 38px; display: flex; grid-auto-flow: column; align-items: center; gap: 8px; padding: 0 12px; border: 1px solid var(--border, #e2e8f0); border-radius: 9px; background: var(--surface-subtle, #f8fafc); cursor: pointer; }
.artist-editor-switches input { width: 17px; height: 17px; accent-color: var(--artist-accent); }
.artist-editor-error { margin: 0; padding: 10px 12px; border-radius: 9px; color: #b91c1c; background: #fef2f2; font-size: .8rem; }
.artist-editor-error[hidden] { display: none; }
.artist-editor-actions { display: flex; justify-content: flex-end; gap: 8px; }
.artist-page.is-editing .artist-page-kpis, .artist-page.is-editing .artist-page-tabs, .artist-page.is-editing .artist-page-panel { opacity: .5; pointer-events: none; }

/* V2-RC1.5.76 — création compacte, cohérente avec Devis/Facture/Projet. */
.artist-page.is-creating :is(.artist-page-hero, .artist-editor-header) { display: none !important; }
.artist-page.is-creating .artist-page-editor { margin: 0; border-top: 3px solid var(--artist-accent); }
.artist-page.is-creating #artistPageForm { gap: 12px; padding: 15px 16px 17px; }

.artist-page-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px; }
.artist-page-kpis button { min-width: 0; min-height: 70px; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 12px 14px; border: 1px solid var(--border, #e2e8f0); border-radius: 12px; background: var(--panel, #fff); color: var(--foreground, #0f172a); text-align: left; cursor: pointer; transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease; }
.artist-page-kpis button:hover { border-color: color-mix(in srgb, var(--artist-accent) 42%, var(--border, #e2e8f0)); box-shadow: 0 6px 18px rgba(15, 23, 42, .06); transform: translateY(-1px); }
.artist-page-kpis button > svg:first-child { width: 19px; height: 19px; padding: 8px; box-sizing: content-box; border-radius: 10px; color: var(--artist-accent); background: color-mix(in srgb, var(--artist-accent) 10%, transparent); }
.artist-page-kpis button > svg:last-child { width: 16px; color: var(--muted, #94a3b8); }
.artist-page-kpis span { min-width: 0; display: grid; gap: 3px; }
.artist-page-kpis small { color: var(--muted, #64748b); font-size: .72rem; }
.artist-page-kpis strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .98rem; }

.artist-page-tabs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); padding: 4px; border: 1px solid var(--border, #e2e8f0); border-radius: 12px; background: var(--panel, #fff); }
.artist-page-tabs button { min-height: 38px; display: flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 9px; background: transparent; color: var(--muted, #64748b); font-weight: 650; cursor: pointer; }
.artist-page-tabs button svg { width: 16px; }
.artist-page-tabs button span { min-width: 22px; padding: 2px 6px; border-radius: 999px; background: var(--surface-subtle, #f1f5f9); font-size: .68rem; }
.artist-page-tabs button[aria-selected="true"] { color: var(--artist-accent); background: color-mix(in srgb, var(--artist-accent) 10%, var(--panel, #fff)); }
.artist-page-panel[hidden] { display: none; }
.artist-page-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.artist-page-wide { grid-column: 1 / -1; }
.artist-page-section { min-width: 0; padding: 18px 20px; }
.artist-page-section > header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--border, #e2e8f0); }
.artist-page-section > header > div { display: flex; align-items: center; gap: 9px; }
.artist-page-section > header svg { width: 18px; color: var(--artist-accent); }
.artist-page-section h2 { margin: 0; font-size: .95rem; }
.artist-page-details { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0; }
.artist-page-details > div { min-width: 0; padding: 10px; border-bottom: 1px solid var(--border, #e2e8f0); }
.artist-page-details dt { margin-bottom: 4px; color: var(--muted, #64748b); font-size: .69rem; font-weight: 650; text-transform: uppercase; letter-spacing: .035em; }
.artist-page-details dd { margin: 0; overflow-wrap: anywhere; color: var(--foreground, #0f172a); font-size: .84rem; font-weight: 600; }
.artist-page-details a { color: inherit; text-decoration-color: color-mix(in srgb, var(--artist-accent) 45%, transparent); }

.artist-page-related-list { display: grid; gap: 7px; }
.artist-related-row { width: 100%; min-width: 0; display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto auto; align-items: center; gap: 11px; padding: 10px 12px; border: 1px solid var(--border, #e2e8f0); border-radius: 10px; background: var(--panel, #fff); color: var(--foreground, #0f172a); text-align: left; cursor: pointer; }
.artist-related-row:hover { border-color: color-mix(in srgb, var(--artist-accent) 35%, var(--border, #e2e8f0)); background: color-mix(in srgb, var(--artist-accent) 3%, var(--panel, #fff)); }
.artist-related-icon { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 9px; color: var(--artist-accent); background: color-mix(in srgb, var(--artist-accent) 9%, transparent); }
.artist-related-icon svg, .artist-related-row > svg { width: 16px; }
.artist-related-row > svg { color: var(--muted, #94a3b8); }
.artist-related-main { min-width: 0; display: grid; gap: 2px; }
.artist-related-main small { color: var(--artist-accent); font-size: .67rem; font-weight: 700; }
.artist-related-main strong, .artist-related-main span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.artist-related-main strong { font-size: .83rem; }
.artist-related-main span { color: var(--muted, #64748b); font-size: .72rem; }
.artist-related-status { padding: 4px 8px; border-radius: 999px; color: var(--muted); background: var(--surface-subtle); font-size: .69rem; font-weight: 650; white-space: nowrap; }
.artist-related-status.is-success { color: #10b981; background: color-mix(in srgb, #10b981 12%, var(--panel)); }
.artist-related-status.is-warning { color: #d97706; background: color-mix(in srgb, #d97706 12%, var(--panel)); }
.artist-related-status.is-danger { color: #ef4444; background: color-mix(in srgb, #ef4444 12%, var(--panel)); }
.artist-related-amount { min-width: 100px; text-align: right; white-space: nowrap; font-size: .82rem; }
.artist-related-empty { min-height: 180px; display: grid; place-content: center; justify-items: center; gap: 7px; color: var(--muted, #64748b); text-align: center; }
.artist-related-empty > svg { width: 30px; color: color-mix(in srgb, var(--artist-accent) 70%, var(--muted, #64748b)); }
.artist-related-empty strong { color: var(--foreground, #0f172a); }
.artist-related-empty p { margin: 0; font-size: .8rem; }

@media (max-width: 980px) {
  .artist-page-hero { grid-template-columns: auto minmax(0, 1fr); }
  .artist-page-hero-meta { grid-column: 1 / -1; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .artist-page-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .artist-editor-grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .artist-page-toolbar .artist-page-actions button { min-width: 40px; width: 40px; min-height: 40px; padding: 0; justify-content: center; }
  .artist-page-toolbar .artist-page-actions button span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .artist-page { padding-bottom: calc(var(--app-mobile-nav-h, 68px) + 24px); }
  .artist-page-hero { padding: 18px; }
  .artist-page-hero-meta { grid-template-columns: 1fr; }
  .artist-page-grid { grid-template-columns: 1fr; }
  .artist-page-wide { grid-column: auto; }
  .artist-page-tabs { display: flex; overflow-x: auto; scrollbar-width: none; }
  .artist-page-tabs button { min-width: max-content; flex: 1 0 auto; padding: 0 14px; }
  .artist-related-row { grid-template-columns: auto minmax(0, 1fr) auto; }
  .artist-related-status, .artist-related-amount { grid-column: 2; justify-self: start; min-width: 0; text-align: left; }
  .artist-related-row > svg { grid-column: 3; grid-row: 1 / span 3; }
  .artist-editor-header { align-items: flex-start; }
  .artist-editor-grid, .artist-editor-grid-3 { grid-template-columns: 1fr; }
  .artist-editor-wide { grid-column: auto; }
}
@media (max-width: 480px) {
  .artist-page-hero { gap: 12px; }
  .artist-page-avatar { width: 48px; height: 48px; }
  .artist-page-kpis, .artist-page-details { grid-template-columns: 1fr; }
  .artist-page-section { padding: 15px; }
  .artist-editor-header { display: grid; }
  .artist-editor-header > button { width: 100%; }
  #artistPageForm { padding: 13px; }
  .artist-editor-actions { display: grid; grid-template-columns: 1fr 1fr; }
}
