/* studio-common.css — shared base for the Matisseo Studio pages.
 * STUDIO_COMMON_2026_08_16. See docs/todo/client-selections.md section 8.
 *
 * Before this file, the studio had no shared stylesheet at all: the seven
 * existing static/*.css serve the public gallery or the shop, and no studio
 * page loaded any of them. :root was redeclared in 71 pages, .header in 69,
 * .btn in 66.
 *
 * HOW TO USE IT
 *
 *   <link rel="stylesheet" href="/studio-common.css?v=1">
 *   <style> ...page-specific rules... </style>
 *
 * The link goes BEFORE the page's own <style>, always. Same specificity means
 * the last declaration wins, so a page keeps the final word on every rule it
 * cares to restate. That is what makes adopting this file safe one page at a
 * time, and reversible.
 *
 * WHAT IS IN HERE, AND WHAT IS DELIBERATELY NOT
 *
 * Only rules that are byte-identical across the pages already using them, or
 * that a clear majority shares. That was measured, not assumed, and the
 * measurement removed things the spec had expected to find here:
 *
 *   .btn      two designs under one name. galerie-details and galleries use a
 *             gradient 999px pill; galerie-contacts uses a flat 10px button.
 *             The majority is below; contacts overrides it in its own <style>,
 *             which now makes its divergence visible instead of buried.
 *   .empty    same story: an inline grey line in contacts, a large dashed box
 *             in galleries. Too contested to hoist; stays in each page.
 *   .pill     three variants. Left out for the same reason.
 *   .main     max-width is per page (1100 / 1500). The shared part is here,
 *             the width is not.
 *
 * A contested rule in a shared file is how a refactor turns into a regression.
 * When one of those genuinely converges, it moves here — with a screenshot.
 */

/* ============================================================
 * Tokens
 * The majority studio palette (~44 pages). Superset of what
 * galerie-details, galleries and galerie-contacts each declared.
 * ============================================================ */
:root {
  --bg: #0a0a0c;
  --bg-card: #131318;
  --bg-card-hover: #1a1a22;
  --bg-input: rgba(255, 255, 255, 0.03);

  --border: #25252e;
  --border-soft: #1d1d26;
  --border-strong: rgba(255, 255, 255, 0.15);

  --text: #ededf0;
  --text-dim: #8a8a96;
  --text-faint: #5a5a66;

  --accent: #7c6ff5;
  --accent-soft: rgba(124, 111, 245, 0.12);
  --accent-glow: rgba(124, 111, 245, 0.45);

  --success: #6fd49a;
  --warn: #f5b66f;
  --danger: #f56f6f;
  --info: #6fb6f5;
  --pink: #f56f9c;
  --gold: #d8a868;
  --teal: #6fc8d4;

  /* DEPRECATED: --green is the older spelling of --success, still referenced
     by the pages on the variant palette. Aliased so those pages keep working
     when they move onto this file; remove once none of them names it. */
  --green: var(--success);

  --serif: 'Cormorant Garamond', Georgia, serif;
  /* The majority spelling, 43 pages against 12. The variant adds system-ui;
     aligning on it would change the font stack of every page migrated here. */
  --sans: 'Inter', -apple-system, sans-serif;

  /* How a photo sits inside its square tile: contain letterboxes the whole
     image, cover fills and centre-crops. One value drives every photo grid. */
  --tile-fit: contain;
}

/* ============================================================
 * Reset and page
 * ============================================================ */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.5;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ============================================================
 * Header — identical in every studio page that declares it
 * ============================================================ */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 28px 56px;
  border-bottom: 1px solid var(--border-soft);
}
.logo { font-family: var(--serif); font-weight: 400; font-size: 32px; line-height: 1; letter-spacing: 0.5px; }
.logo-tagline { font-family: var(--serif); font-style: italic; font-size: 12px; color: var(--text-faint); margin-top: 2px; letter-spacing: 0.5px; }

.nav { display: flex; gap: 32px; }
.nav a {
  color: var(--text-dim); text-decoration: none; font-size: 11px;
  letter-spacing: 2px; text-transform: uppercase; font-weight: 500;
  padding: 8px 0; position: relative; transition: color 0.2s; white-space: nowrap;
}
.nav a:hover { color: var(--text); }
.nav a.active { color: var(--text); }
.nav a.active::after {
  content: ''; position: absolute; bottom: -2px; left: 0; right: 0;
  height: 2px; background: var(--accent); border-radius: 2px;
}

.user { display: flex; align-items: center; gap: 12px; cursor: pointer; }
.user-name { font-size: 12px; letter-spacing: 1.5px; text-transform: uppercase; font-weight: 500; }
.user-avatar {
  width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--border);
  display: grid; place-items: center; color: var(--text-dim);
}

/* ============================================================
 * Breadcrumb
 * .main is NOT here: 54 studio pages declare it with their own padding and
 * width. A shared one would leak whichever properties a page left out.
 * ============================================================ */

.crumb {
  display: flex; align-items: center; gap: 10px;
  font-size: 12px; color: var(--text-faint); margin-bottom: 20px;
}
.crumb a { color: var(--text-dim); text-decoration: none; transition: color 0.2s; }
.crumb a:hover { color: var(--text); }

/* ============================================================
 * Nothing else lives here, and that is the point.
 *
 * An audit over the 71 studio pages found 33 of 47 candidate selectors
 * already defined differently somewhere: .main in 54 pages, .btn in 50,
 * .page-head in 30, .photo-tile in two pages meaning two different things.
 *
 * A shared rule also leaks the properties a page never declared. When
 * galerie-details drew its podium with its own .photo-tile and no background,
 * the background from here showed through -- a page cannot override what it
 * does not know it has.
 *
 * So a selector earns its place here only if no studio page contradicts it.
 * Run tools/audit_studio_css.py before adding one.
 * ============================================================ */
