/* ==========================================================
   Art-Tisan — Frontend dynamique
   Mobile first, sans framework et sans étape de compilation.
   ========================================================== */

:root {
  --primary: #6f4e37;
  --primary-dark: #4b3325;
  --primary-soft: #eadfd3;
  --secondary: #c58a3a;
  --secondary-soft: #f4dfbd;
  --accent: #56735a;
  --accent-soft: #dce7dc;
  --background: #fffaf3;
  --background-alt: #f7f0e7;
  --surface: #ffffff;
  --surface-glass: rgba(255, 255, 255, .86);
  --text: #2f2925;
  --text-soft: #625a55;
  --text-light: #817873;
  --border: #e6ddd4;
  --border-strong: #d4c6b9;
  --danger: #a33f3f;
  --danger-soft: #f7dddd;
  --success: #39734b;
  --success-soft: #dcecdf;
  --warning: #9b6729;
  --warning-soft: #f6e7ce;
  --focus: #2b6cb0;
  --shadow-small: 0 8px 24px rgba(66, 46, 32, .08);
  --shadow-medium: 0 18px 50px rgba(66, 46, 32, .13);
  --shadow-large: 0 32px 90px rgba(48, 34, 24, .18);
  --radius-small: 12px;
  --radius: 20px;
  --radius-large: 32px;
  --content-width: 1240px;
  --transition: .24s ease;
  --font-display: Georgia, "Times New Roman", serif;
  --font-body: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; color-scheme: light; }
body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at 10% -10%, rgba(197, 138, 58, .10), transparent 28rem),
    var(--background);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
body.dialog-open { overflow: hidden; }
img { display: block; max-width: 100%; }
button, input, textarea, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
button { color: inherit; }
h1, h2, h3, p, blockquote, dl, dd { margin-top: 0; }
h1, h2, h3 { text-wrap: balance; }
h1, h2 { font-family: var(--font-display); }
textarea { resize: vertical; }

.hidden { display: none !important; }
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}
.skip-link {
  position: fixed;
  z-index: 9999;
  top: 12px;
  left: 12px;
  transform: translateY(-150%);
  border-radius: 999px;
  background: var(--text);
  color: white;
  padding: .75rem 1rem;
  text-decoration: none;
  transition: transform var(--transition);
}
.skip-link:focus { transform: translateY(0); }
:focus-visible { outline: 3px solid rgba(43, 108, 176, .42); outline-offset: 3px; }

.page-shell { width: min(100% - 32px, var(--content-width)); margin-inline: auto; }
.preserve-lines { white-space: pre-line; }
.long-copy { color: var(--text-soft); font-size: 1.02rem; line-height: 1.9; }
.subtle-label {
  display: block;
  color: var(--text-light);
  font-size: .74rem;
  font-weight: 800;
  letter-spacing: .11em;
  text-transform: uppercase;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  gap: .4rem;
  margin-bottom: .9rem;
  color: var(--secondary);
  font-size: .78rem;
  font-weight: 850;
  letter-spacing: .09em;
  text-transform: uppercase;
}
.eyebrow-light { color: rgba(255, 255, 255, .86); }
.required { color: var(--warning); }

/* Buttons */
.button,
.icon-button,
.text-button,
.nav-item,
.account-choice,
.search-clear,
.password-toggle {
  border: 0;
  cursor: pointer;
}
.button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  gap: .65rem;
  border-radius: 999px;
  padding: .78rem 1.25rem;
  font-weight: 780;
  line-height: 1;
  text-decoration: none;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition), color var(--transition), border-color var(--transition);
}
.button:hover { transform: translateY(-2px); }
.button:active { transform: translateY(0) scale(.98); }
.button:disabled { cursor: wait; opacity: .58; transform: none; }
.button-primary { background: var(--primary); color: #fff; box-shadow: 0 12px 28px rgba(111, 78, 55, .22); }
.button-primary:hover { background: var(--primary-dark); box-shadow: 0 16px 34px rgba(111, 78, 55, .28); }
.button-secondary { background: var(--secondary-soft); color: var(--primary-dark); }
.button-secondary:hover { background: #efd19e; }
.button-ghost { border: 1px solid var(--border-strong); background: rgba(255, 255, 255, .75); color: var(--text); }
.button-ghost:hover { border-color: var(--primary); color: var(--primary); }
.button-glass { border: 1px solid rgba(255, 255, 255, .52); background: rgba(255, 255, 255, .13); color: #fff; backdrop-filter: blur(16px); }
.button-glass:hover { background: rgba(255, 255, 255, .24); }
.button-small { min-height: 40px; padding: .65rem 1rem; font-size: .88rem; }
.button-wide { width: 100%; }
.button-icon { width: 48px; min-width: 48px; padding: 0; }
.text-button, .text-link {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  background: none;
  color: var(--primary);
  font-weight: 760;
  text-decoration: none;
}
.text-button:hover, .text-link:hover { text-decoration: underline; }
.icon-button {
  position: relative;
  display: inline-grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--surface);
  box-shadow: var(--shadow-small);
  transition: transform var(--transition), border-color var(--transition), color var(--transition);
}
.icon-button:hover { transform: translateY(-2px); border-color: var(--primary); color: var(--primary); }
.badge {
  position: absolute;
  top: -5px;
  right: -5px;
  display: grid;
  min-width: 20px;
  height: 20px;
  place-items: center;
  border: 2px solid var(--surface);
  border-radius: 999px;
  background: var(--danger);
  color: white;
  padding-inline: 4px;
  font-size: .65rem;
  font-weight: 850;
}

/* Header */
.site-header {
  position: sticky;
  z-index: 1000;
  top: 0;
  border-bottom: 1px solid rgba(230, 221, 212, .78);
  background: rgba(255, 250, 243, .91);
  backdrop-filter: blur(18px);
}
.header-container {
  display: grid;
  width: min(100% - 28px, 1400px);
  margin-inline: auto;
  gap: 12px;
  padding: 12px 0;
}
.site-header.compact .header-container { grid-template-columns: auto 1fr auto; align-items: center; }
.logo { display: inline-flex; width: fit-content; align-items: baseline; font-size: 1.72rem; font-weight: 900; letter-spacing: -.04em; text-decoration: none; }
.logo-art { color: var(--primary); }
.logo-tisan { color: var(--secondary); }
.search-form {
  display: flex;
  width: 100%;
  min-width: 0;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, .85);
  box-shadow: 0 8px 30px rgba(70, 49, 34, .055);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.search-form:focus-within { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(111, 78, 55, .08); }
.search-button, .search-clear { width: 48px; min-width: 48px; align-self: stretch; background: transparent; color: var(--text-light); }
.search-form input { width: 100%; min-width: 0; border: 0; outline: 0; background: transparent; padding: .82rem 0; color: var(--text); }
.header-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.profile-chip {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  padding: .35rem .75rem .35rem .35rem;
  font-size: .85rem;
  font-weight: 760;
  text-decoration: none;
}
.profile-chip-avatar, .large-avatar {
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--secondary-soft), var(--accent-soft));
  color: var(--primary-dark);
  font-family: var(--font-display);
  font-weight: 900;
}
.profile-chip-avatar { width: 32px; height: 32px; font-size: .72rem; }
.profile-chip-avatar img, .large-avatar img { width: 100%; height: 100%; object-fit: cover; }
.back-link { display: inline-flex; align-items: center; gap: .5rem; color: var(--primary); font-weight: 760; text-decoration: none; }
.back-link:hover { text-decoration: underline; }

/* Navigation */
.primary-navigation {
  position: fixed;
  z-index: 950;
  left: 50%;
  bottom: calc(14px + env(safe-area-inset-bottom, 0px));
  display: flex;
  width: min(calc(100% - 18px), 620px);
  height: 70px;
  transform: translateX(-50%);
  align-items: stretch;
  justify-content: space-around;
  border: 1px solid rgba(214, 201, 188, .9);
  border-radius: 26px;
  background: rgba(255, 255, 255, .91);
  box-shadow: var(--shadow-medium);
  backdrop-filter: blur(18px);
  padding: 5px;
}
.nav-item {
  position: relative;
  display: flex;
  flex: 1;
  min-width: 0;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  border-radius: 20px;
  background: transparent;
  color: var(--text-light);
  font-size: .68rem;
  font-weight: 750;
  text-decoration: none;
  transition: color var(--transition), background var(--transition), transform var(--transition);
}
.nav-item i { font-size: 1.05rem; }
.nav-item:hover { color: var(--primary); }
.nav-item.active { background: var(--primary-soft); color: var(--primary-dark); }
.nav-item .badge { top: 5px; right: 13%; }

/* Hero */
.hero { position: relative; min-height: clamp(620px, 82vh, 850px); overflow: hidden; border-radius: 0 0 34px 34px; }
.hero-background, .detail-hero-background {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(125deg, rgba(111, 78, 55, .92), rgba(197, 138, 58, .35)),
    radial-gradient(circle at 72% 30%, rgba(255, 255, 255, .22), transparent 25%),
    #5a4030 center / cover no-repeat;
  transition: opacity .32s ease;
}
.hero-background {
  background-position: center;
  background-size: cover;
}
.hero.hero-platform-slide .hero-background {
  background-color: #2b1d15;
  background-position: center center !important;
  background-size: cover;
  background-repeat: no-repeat;
}
.hero.hero-platform-slide .hero-overlay {
  background: linear-gradient(90deg, #241812 0%, #241812 32%, rgba(36, 24, 18, .94) 38%, rgba(36, 24, 18, .53) 58%, rgba(36, 24, 18, .08) 86%, rgba(36, 24, 18, .02) 100%);
}
.hero-overlay {
  position: relative;
  z-index: 1;
  display: flex;
  min-height: inherit;
  align-items: stretch;
  background: linear-gradient(90deg, rgba(24, 17, 13, .92) 0%, rgba(24, 17, 13, .82) 31%, rgba(24, 17, 13, .44) 52%, rgba(24, 17, 13, .10) 76%, rgba(24, 17, 13, .03) 100%);
  padding: 46px 0 82px;
}
.hero-content.page-shell {
  display: flex;
  width: 100%;
  max-width: none;
  margin-inline: 0;
  padding-inline: clamp(30px, 7vw, 125px);
  flex-direction: column;
  justify-content: space-between;
  color: white;
}
.hero-copy { max-width: 610px; }
.hero-bottom { max-width: 610px; margin-top: auto; }
.hero h1 { margin-bottom: 1.2rem; font-size: clamp(2.55rem, 7vw, 5.5rem); line-height: .98; letter-spacing: -.045em; }
.hero-description { color: rgba(255, 255, 255, .9); font-size: clamp(1rem, 2vw, 1.2rem); line-height: 1.72; }
.hero-buttons { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.8rem; }
.hero-review-meta { display: block; margin-top: .65rem; color: rgba(255, 255, 255, .72); font-size: .76rem; font-weight: 750; letter-spacing: .035em; }
.hero-bottom .hero-dots { position: static; justify-content: flex-start; margin-top: 22px; transform: none; }
.hero-ai-disclosure {
  position: absolute;
  z-index: 2;
  right: clamp(16px, 2vw, 34px);
  bottom: clamp(12px, 1.6vw, 24px);
  max-width: min(430px, calc(100% - 32px));
  border-radius: 8px;
  background: rgba(28, 19, 14, .72);
  padding: .44rem .62rem;
  color: rgba(255, 255, 255, .92);
  font-family: var(--font-display);
  font-size: clamp(.66rem, .72vw, .78rem);
  font-weight: 400;
  line-height: 1.35;
  letter-spacing: .01em;
  text-align: right;
  text-wrap: balance;
  text-shadow: 0 1px 4px rgba(0, 0, 0, .55);
  pointer-events: none;
}

/* Une slide = un seul message. Les slides atelier laissent l'image dominer. */
.hero.hero-workshop-slide .hero-overlay {
  background:
    linear-gradient(90deg, rgba(24, 17, 13, .64) 0%, rgba(24, 17, 13, .27) 34%, rgba(24, 17, 13, .05) 60%, transparent 82%),
    linear-gradient(180deg, rgba(24, 17, 13, .42) 0%, transparent 48%, rgba(24, 17, 13, .56) 100%);
}
.hero.hero-workshop-slide .hero-copy { max-width: 560px; text-shadow: 0 2px 18px rgba(15, 10, 7, .52); }
.hero.hero-workshop-slide h1 {
  max-width: 560px;
  margin-bottom: .65rem;
  font-size: clamp(1.65rem, 3.4vw, 2.8rem);
  font-weight: 650;
  line-height: 1.08;
  letter-spacing: -.025em;
}
.hero.hero-workshop-slide .hero-description { max-width: 540px; margin: 0; font-size: clamp(.94rem, 1.45vw, 1.08rem); font-style: italic; line-height: 1.55; }
.hero.hero-workshop-slide .hero-buttons { margin-top: 0; }
.hero.hero-workshop-slide .hero-buttons .button { padding-block: .62rem; }

/* Sections */
.homepage-content { min-height: 700px; padding-block: 55px 120px; }
.page-section { display: none; animation: section-enter .34s ease both; }
.page-section.active { display: block; }
@keyframes section-enter { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.section-header { max-width: 800px; margin-bottom: 2rem; }
.section-header h2 { margin-bottom: .8rem; font-size: clamp(2rem, 6vw, 3.5rem); line-height: 1.04; letter-spacing: -.035em; }
.section-header p { color: var(--text-soft); font-size: 1.03rem; line-height: 1.8; }
.section-header.compact-heading { margin-bottom: 1.4rem; }
.section-header.compact-heading h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
.section-actions { display: flex; justify-content: center; padding-top: 1.5rem; }
.search-status { margin-bottom: 1.2rem; border-left: 4px solid var(--secondary); border-radius: 0 var(--radius-small) var(--radius-small) 0; background: var(--warning-soft); padding: .8rem 1rem; color: var(--primary-dark); }
.discovery-feed { display: grid; gap: 1.4rem; }
.card-grid, .event-grid { display: grid; grid-template-columns: 1fr; gap: 1.25rem; }

/* Dynamic cards */
.creator-card, .creation-card, .event-card, .ranking-card, .state-card, .info-card, .settings-card {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-large);
  background: var(--surface);
  box-shadow: var(--shadow-small);
}
.creator-card, .creation-card { min-width: 0; transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition); }
.creator-card:hover, .creation-card:hover { transform: translateY(-5px); border-color: var(--border-strong); box-shadow: var(--shadow-medium); }
.creator-banner, .creation-image { position: relative; overflow: hidden; background: linear-gradient(135deg, var(--primary-soft), var(--secondary-soft)); }
.creator-banner { min-height: 230px; }
.creation-image { aspect-ratio: 4 / 3; }
.creator-banner img, .creation-image img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s ease; }
.creator-card:hover .creator-banner img, .creation-card:hover .creation-image img { transform: scale(1.035); }
.card-floating-action { position: absolute; top: 14px; right: 14px; }
.card-floating-action.active { background: var(--danger); color: white; border-color: var(--danger); }
.creator-content, .creation-content { position: relative; min-width: 0; padding: 1.25rem; }
.creator-avatar {
  width: 86px;
  height: 86px;
  margin-top: -58px;
  margin-bottom: .8rem;
  overflow: hidden;
  border: 5px solid var(--surface);
  border-radius: 50%;
  background: var(--primary-soft);
  box-shadow: var(--shadow-small);
}
.creator-avatar img { width: 100%; height: 100%; object-fit: cover; }
.creator-name, .creation-title {
  min-width: 0;
  margin-bottom: .25rem;
  padding-block: .08em;
  overflow: visible;
  font-size: 1.55rem;
  line-height: 1.25;
  overflow-wrap: anywhere;
  white-space: normal;
}
.creator-job, .creation-category {
  min-width: 0;
  margin-bottom: .9rem;
  overflow: visible;
  color: var(--secondary);
  font-size: .86rem;
  font-weight: 780;
  line-height: 1.4;
  overflow-wrap: anywhere;
  text-overflow: clip;
  white-space: normal;
}
.creator-quote, .creation-quote {
  margin: 0 0 1rem;
  border-left: 3px solid var(--secondary-soft);
  padding-left: .9rem;
  color: var(--text-soft);
  font-family: var(--font-display);
  font-style: italic;
  line-height: 1.75;
}
.card-facts { display: grid; gap: .65rem; margin-block: 1rem; }
.card-fact { display: flex; align-items: flex-start; gap: .75rem; color: var(--text-soft); font-size: .88rem; }
.card-fact i { display: grid; width: 34px; height: 34px; flex: 0 0 auto; place-items: center; border-radius: 50%; background: var(--background-alt); color: var(--primary); }
.card-fact strong { display: block; margin-bottom: .08rem; color: var(--text); font-size: .78rem; }
.card-footer { display: flex; align-items: center; justify-content: space-between; gap: .8rem; margin-top: 1rem; }
.creator-link, .creation-link { color: var(--primary); font-weight: 820; text-decoration: none; }
.creator-link:hover, .creation-link:hover { text-decoration: underline; }
.price-tag { color: var(--primary-dark); font-size: 1.15rem; font-weight: 900; }
.author-row { display: flex; align-items: flex-start; gap: .7rem; min-width: 0; }
.author-avatar { width: 42px; height: 42px; flex: 0 0 auto; overflow: hidden; border-radius: 50%; background: var(--accent-soft); }
.author-avatar img { width: 100%; height: 100%; object-fit: cover; }
.author-row > span:last-child { min-width: 0; }
.author-row strong { display: block; overflow: visible; line-height: 1.3; overflow-wrap: anywhere; text-overflow: clip; white-space: normal; }
.author-row small { color: var(--text-light); }

/* Les intitulés des cartes doivent rester lisibles, même avec un nom long. */
.creator-name a,
.creation-title a,
.creator-week-copy h3,
.ranking-card h3,
.management-list-row strong,
.creator-order-summary strong,
.creator-order-item-main strong,
.product-management-main strong,
.cart-group-header h2,
.cart-item-copy strong,
.purchase-order-main h3,
.purchase-history-item strong {
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: normal;
  white-space: normal;
}
.creator-name a,
.creation-title a { display: block; }

/* States */
.state-card { display: grid; min-height: 210px; place-items: center; text-align: center; padding: 2rem; }
.state-card > div { max-width: 480px; }
.state-icon { display: grid; width: 64px; height: 64px; place-items: center; margin: 0 auto 1rem; border-radius: 50%; background: var(--primary-soft); color: var(--primary); font-size: 1.5rem; }
.state-card h3 { margin-bottom: .55rem; font-size: 1.45rem; }
.state-card p { color: var(--text-soft); }
.loading-grid { display: grid; grid-template-columns: 1fr; gap: 1rem; }
.skeleton { min-height: 330px; border-radius: var(--radius-large); background: linear-gradient(90deg, #eee6dd 25%, #faf6f1 50%, #eee6dd 75%); background-size: 220% 100%; animation: shimmer 1.4s infinite; }
@keyframes shimmer { to { background-position: -220% 0; } }

/* Events and ranking */
.event-card { display: grid; }
.event-visual { min-height: 180px; background: linear-gradient(135deg, var(--accent), var(--primary)); color: white; padding: 1.4rem; }
.event-visual .eyebrow { color: var(--secondary-soft); }
.event-visual h3 { margin-bottom: .45rem; font-size: 1.8rem; }
.event-visual p { color: rgba(255, 255, 255, .8); }
.event-body { padding: 1.2rem; }
.event-meta { display: flex; flex-wrap: wrap; gap: .55rem; margin-bottom: 1rem; }
.meta-pill, .count-pill, .account-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: var(--background-alt);
  color: var(--primary-dark);
  padding: .35rem .7rem;
  font-size: .75rem;
  font-weight: 780;
}
.ranking-list { display: grid; gap: .8rem; }
.ranking-card { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 1rem; padding: 1rem; }
.ranking-position { display: grid; width: 46px; height: 46px; place-items: center; border-radius: 50%; background: var(--secondary-soft); color: var(--primary-dark); font-family: var(--font-display); font-size: 1.2rem; font-weight: 900; }
.ranking-card:first-child .ranking-position { background: var(--secondary); color: white; }
.ranking-card h3 { margin-bottom: .15rem; font-size: 1.1rem; }
.ranking-card p { margin-bottom: 0; color: var(--text-light); font-size: .84rem; }
.vote-count { color: var(--primary); font-weight: 900; }

/* Messaging */
.messaging-layout { overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius-large); background: var(--surface); box-shadow: var(--shadow-small); }
.conversation-panel { border-bottom: 1px solid var(--border); }
.panel-heading, .message-panel-header { display: flex; min-height: 72px; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--border); padding: 1rem; }
.panel-heading h3, .message-panel-header h3 { margin-bottom: 0; }
.conversation-list { display: flex; max-height: 360px; overflow: auto; }
.conversation-item {
  display: grid;
  min-width: 220px;
  flex: 0 0 220px;
  grid-template-columns: auto 1fr;
  gap: .7rem;
  border: 0;
  border-right: 1px solid var(--border);
  background: var(--surface);
  padding: 1rem;
  text-align: left;
  cursor: pointer;
}
.conversation-item:hover, .conversation-item.active { background: var(--background-alt); }
.conversation-avatar { display: grid; width: 42px; height: 42px; place-items: center; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-weight: 850; }
.conversation-copy { min-width: 0; }
.conversation-copy strong, .conversation-copy span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conversation-copy span { color: var(--text-light); font-size: .8rem; }
.message-panel { min-width: 0; }
.message-list { display: flex; min-height: 300px; max-height: 520px; flex-direction: column; gap: .7rem; overflow-y: auto; padding: 1rem; background: #fcf9f5; }
.message-bubble { align-self: flex-start; max-width: min(85%, 560px); border: 1px solid var(--border); border-radius: 18px 18px 18px 5px; background: white; padding: .75rem .9rem; }
.message-bubble.mine { align-self: flex-end; border-color: var(--primary-soft); border-radius: 18px 18px 5px 18px; background: var(--primary-soft); }
.message-bubble p { margin-bottom: .25rem; white-space: pre-wrap; word-break: break-word; }
.message-bubble time { color: var(--text-light); font-size: .68rem; }
.message-composer { display: flex; align-items: flex-end; gap: .65rem; border-top: 1px solid var(--border); padding: .8rem; }
.message-composer textarea { flex: 1; min-height: 46px; max-height: 150px; border: 1px solid var(--border); border-radius: 18px; outline: 0; padding: .75rem 1rem; }
.message-composer textarea:focus { border-color: var(--primary); }

/* Footer */
.site-footer { border-top: 1px solid var(--border); background: #f2e9df; padding: 3.5rem 0 7.5rem; }
.footer-grid { display: grid; gap: 2rem; }
.footer-grid section { display: flex; flex-direction: column; align-items: flex-start; gap: .45rem; }
.footer-grid h2 { margin-bottom: .35rem; font-size: 1.9rem; }
.footer-grid h3 { margin-bottom: .45rem; font-size: 1rem; }
.footer-grid a { color: var(--text-soft); text-decoration: none; }
.footer-grid a:hover { color: var(--primary); text-decoration: underline; }
.footer-brand p, .footer-copy { color: var(--text-soft); line-height: 1.75; }
.newsletter-form { display: flex; width: 100%; flex-wrap: wrap; gap: .5rem; }
.newsletter-form input { min-width: 180px; flex: 1; border: 1px solid var(--border-strong); border-radius: 999px; background: white; outline: 0; padding: .75rem 1rem; }
.footer-bottom { display: flex; flex-direction: column; gap: .35rem; border-top: 1px solid rgba(111, 78, 55, .14); margin-top: 2.5rem; padding-top: 1.2rem; color: var(--text-light); font-size: .78rem; }

/* Dialog and toasts */
.app-dialog {
  width: min(92vw, 520px);
  max-height: min(82vh, 760px);
  border: 1px solid var(--border);
  border-radius: var(--radius-large);
  background: var(--surface);
  box-shadow: var(--shadow-large);
  padding: 0;
}
.app-dialog::backdrop { background: rgba(31, 23, 18, .52); backdrop-filter: blur(3px); }
.dialog-header { display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--border); padding: 1rem; }
.dialog-header h2 { margin-bottom: 0; }
.notification-list { display: grid; max-height: 560px; overflow-y: auto; }
.notification-item { display: grid; grid-template-columns: auto 1fr; gap: .8rem; border-bottom: 1px solid var(--border); padding: 1rem; }
.notification-item.unread { background: var(--background-alt); }
.notification-icon { display: grid; width: 38px; height: 38px; place-items: center; border-radius: 50%; background: var(--primary-soft); color: var(--primary); }
.notification-item p { margin-bottom: .2rem; }
.notification-item time { color: var(--text-light); font-size: .72rem; }
.toast-region { position: fixed; z-index: 2000; top: 82px; right: 12px; display: grid; width: min(390px, calc(100% - 24px)); gap: .6rem; pointer-events: none; }
.toast { display: grid; grid-template-columns: auto 1fr auto; align-items: start; gap: .7rem; border: 1px solid var(--border); border-left: 5px solid var(--primary); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-medium); padding: .9rem; animation: toast-enter .3s ease both; pointer-events: auto; }
.toast.success { border-left-color: var(--success); }
.toast.error { border-left-color: var(--danger); }
.toast.warning { border-left-color: var(--warning); }
.toast p { margin-bottom: 0; color: var(--text-soft); font-size: .9rem; }
.toast button { border: 0; background: none; cursor: pointer; }
@keyframes toast-enter { from { opacity: 0; transform: translateY(-10px); } }

/* Auth */
.auth-body { background: var(--background-alt); }
.auth-layout { display: grid; min-height: 100svh; }
.auth-visual { position: relative; display: none; overflow: hidden; flex-direction: column; justify-content: space-between; background: linear-gradient(145deg, rgba(64, 45, 33, .92), rgba(86, 115, 90, .78)), #493527; color: white; padding: 2.2rem; }
.auth-visual::after { position: absolute; right: -20%; bottom: -18%; width: 500px; height: 500px; border: 1px solid rgba(255, 255, 255, .13); border-radius: 50%; box-shadow: 0 0 0 80px rgba(255, 255, 255, .04), 0 0 0 160px rgba(255, 255, 255, .03); content: ""; }
.auth-logo { position: relative; z-index: 1; }
.auth-visual-content, .auth-visual blockquote { position: relative; z-index: 1; }
.auth-visual h1 { max-width: 700px; font-size: clamp(2.7rem, 6vw, 5.3rem); line-height: .98; }
.auth-visual p, .auth-visual blockquote { max-width: 590px; color: rgba(255, 255, 255, .8); line-height: 1.8; }
.auth-visual blockquote { margin-bottom: 0; font-family: var(--font-display); font-size: 1.1rem; font-style: italic; }
.auth-panel { display: grid; min-height: 100svh; place-items: center; padding: 1.2rem; }
.auth-card { width: min(100%, 520px); border: 1px solid var(--border); border-radius: var(--radius-large); background: var(--surface); box-shadow: var(--shadow-medium); padding: clamp(1.25rem, 5vw, 2.7rem); }
.auth-card > h1 { margin: 1.1rem 0 .55rem; font-size: clamp(2.2rem, 8vw, 3.5rem); }
.auth-intro { color: var(--text-soft); line-height: 1.7; }
.auth-switch { margin: 1.4rem 0 0; text-align: center; color: var(--text-light); }
.auth-switch a { color: var(--primary); font-weight: 800; }

/* Forms */
.form-stack { display: flex; flex-direction: column; gap: 1rem; margin-top: 1.5rem; }
.field-group { display: flex; flex-direction: column; gap: .42rem; }
.field-group label, .label-row label { font-size: .88rem; font-weight: 780; }
.field-group small { color: var(--text-light); line-height: 1.55; }
.label-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.label-row a { color: var(--primary); font-size: .8rem; font-weight: 750; text-decoration: none; }
.input-shell { display: flex; min-height: 52px; align-items: center; border: 1px solid var(--border-strong); border-radius: 16px; background: white; transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition); }
.input-shell:focus-within { transform: translateY(-1px); border-color: var(--primary); box-shadow: 0 0 0 4px rgba(111, 78, 55, .08); }
.input-shell > i { width: 50px; flex: 0 0 auto; text-align: center; color: var(--text-light); }
.input-shell input { width: 100%; min-width: 0; border: 0; outline: 0; background: transparent; padding: .85rem .2rem; }
.password-toggle { width: 48px; align-self: stretch; background: transparent; color: var(--text-light); }
.field-group > textarea { border: 1px solid var(--border-strong); border-radius: 16px; outline: 0; padding: .9rem; }
.field-group > textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(111, 78, 55, .08); }
.checkbox-row { display: flex; align-items: flex-start; gap: .65rem; color: var(--text-soft); font-size: .87rem; cursor: pointer; }
.checkbox-row input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--primary); }
.form-feedback { border: 1px solid var(--danger); border-radius: var(--radius-small); background: var(--danger-soft); color: #6e2929; padding: .8rem 1rem; }
.form-feedback.success { border-color: var(--success); background: var(--success-soft); color: #275737; }
.form-feedback ul { margin: .45rem 0 0; padding-left: 1.15rem; }
.form-callout { display: grid; grid-template-columns: auto 1fr; gap: .8rem; border-radius: var(--radius); background: var(--warning-soft); padding: 1rem; }
.form-callout.neutral { background: var(--background-alt); }
.form-callout i { color: var(--warning); font-size: 1.25rem; }
.form-callout p { margin-bottom: 0; color: var(--text-soft); font-size: .86rem; }
.two-column-fields { display: grid; gap: 1rem; }
.password-meter { height: 7px; overflow: hidden; border-radius: 999px; background: #eee6df; }
.password-meter span { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--danger); transition: width .25s ease, background .25s ease; }

/* Registration */
.register-body { background: linear-gradient(180deg, var(--background), var(--background-alt)); }
.registration-shell { width: min(100% - 28px, 1180px); min-height: 100svh; margin-inline: auto; padding: 1.1rem 0 3rem; }
.registration-header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.registration-progress { display: flex; max-width: 720px; align-items: center; margin: 2rem auto 3rem; }
.progress-step { color: var(--text-light); font-size: .72rem; font-weight: 800; white-space: nowrap; }
.progress-step.active { color: var(--primary); }
.progress-line { width: 100%; height: 1px; margin-inline: .7rem; background: var(--border-strong); }
.registration-stage { display: none; animation: section-enter .4s ease both; }
.registration-stage.active { display: block; }
.registration-copy { max-width: 760px; margin: 0 auto 2rem; text-align: center; }
.registration-copy h1 { font-size: clamp(2.3rem, 8vw, 4.7rem); line-height: 1; }
.registration-copy p { color: var(--text-soft); font-size: 1.04rem; }
.account-choice-grid { display: grid; gap: 1rem; }
.account-choice { display: flex; min-height: 290px; flex-direction: column; align-items: flex-start; border: 1px solid var(--border); border-radius: var(--radius-large); background: var(--surface); box-shadow: var(--shadow-small); padding: 1.5rem; text-align: left; transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition); }
.account-choice:hover, .account-choice.selected { transform: translateY(-5px); border-color: var(--primary); box-shadow: var(--shadow-medium); }
.choice-icon { display: grid; width: 58px; height: 58px; place-items: center; margin-bottom: 1.2rem; border-radius: 18px; background: var(--primary-soft); color: var(--primary); font-size: 1.35rem; }
.account-choice:nth-child(2) .choice-icon { background: var(--accent-soft); color: var(--accent); }
.account-choice strong { margin-bottom: .55rem; font-family: var(--font-display); font-size: 1.7rem; }
.account-choice > span:not(.choice-icon) { color: var(--text-soft); line-height: 1.75; }
.account-choice em { margin-top: auto; color: var(--secondary); font-size: .75rem; font-style: normal; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.register-grid { display: grid; gap: 2rem; }
.register-form-column { border: 1px solid var(--border); border-radius: var(--radius-large); background: var(--surface); box-shadow: var(--shadow-small); padding: clamp(1.2rem, 4vw, 2.3rem); }
.register-form-column h1 { font-size: clamp(2.2rem, 6vw, 3.5rem); line-height: 1.04; }
.workshop-preview { position: relative; overflow: hidden; border-radius: var(--radius-large); background: linear-gradient(145deg, var(--primary-dark), var(--accent)); color: white; padding: 2rem; box-shadow: var(--shadow-medium); }
.workshop-preview-art { position: relative; display: grid; min-height: 260px; place-items: center; }
.workshop-preview-art > i { position: relative; z-index: 2; font-size: 5rem; color: var(--secondary-soft); }
.material-orbit { position: absolute; border: 1px solid rgba(255, 255, 255, .18); border-radius: 50%; }
.orbit-one { width: 190px; height: 190px; }
.orbit-two { width: 285px; height: 285px; }
.workshop-preview blockquote { margin: 0 0 1rem; font-family: var(--font-display); font-size: 1.35rem; line-height: 1.55; }
.workshop-preview p { color: rgba(255, 255, 255, .76); }
.success-card { max-width: 720px; margin: 3rem auto; border: 1px solid var(--border); border-radius: var(--radius-large); background: var(--surface); box-shadow: var(--shadow-medium); padding: clamp(1.5rem, 6vw, 3.5rem); text-align: center; }
.success-icon { display: grid; width: 80px; height: 80px; place-items: center; margin: 0 auto 1.4rem; border-radius: 50%; background: var(--success-soft); color: var(--success); font-size: 2rem; }
.success-card h1 { font-size: clamp(2.2rem, 7vw, 4rem); line-height: 1.03; }
.success-card p { color: var(--text-soft); }
.success-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: .75rem; margin-top: 1.4rem; }

/* Detail pages */
.detail-hero { position: relative; min-height: 520px; overflow: hidden; }
.detail-hero-overlay { position: relative; z-index: 1; display: flex; min-height: inherit; align-items: flex-end; background: linear-gradient(0deg, rgba(29, 21, 16, .8), rgba(29, 21, 16, .15)); padding: 4rem 0; }
.detail-hero-content { color: white; }
.detail-hero-content h1 { max-width: 850px; margin-bottom: .7rem; font-size: clamp(2.8rem, 8vw, 5.8rem); line-height: .95; }
.detail-hero-content > p { max-width: 700px; color: rgba(255, 255, 255, .84); font-size: 1.1rem; }
.detail-actions { display: flex; flex-wrap: wrap; gap: .65rem; margin-top: 1.4rem; }
.detail-layout { display: grid; gap: 2rem; padding-block: 3rem; }
.story-panel { display: grid; gap: 2.8rem; }
.creator-identity { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 1rem; }
.large-avatar { width: 84px; height: 84px; font-size: 1.3rem; }
.creator-identity h2 { margin-bottom: .2rem; font-size: 2rem; }
.creator-identity p { margin-bottom: 0; color: var(--text-light); }
.story-panel section { border-bottom: 1px solid var(--border); padding-bottom: 2rem; }
.story-panel section h2 { font-size: clamp(1.9rem, 5vw, 3rem); }
.detail-sidebar { display: grid; align-content: start; gap: 1rem; }
.info-card { padding: 1.25rem; }
.info-card h3 { margin-bottom: 1rem; }
.info-card p { color: var(--text-soft); }
.detail-list { display: grid; gap: 0; margin-bottom: 0; }
.detail-list > div { display: grid; grid-template-columns: minmax(100px, .7fr) 1.3fr; gap: 1rem; border-top: 1px solid var(--border); padding: .8rem 0; }
.detail-list dt { color: var(--text-light); font-size: .8rem; font-weight: 780; }
.detail-list dd { margin-bottom: 0; text-align: right; word-break: break-word; }
.gallery-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: .7rem; }
.gallery-grid figure { margin: 0; overflow: hidden; border-radius: var(--radius); background: var(--primary-soft); aspect-ratio: 1; }
.gallery-grid img { width: 100%; height: 100%; object-fit: cover; }
.related-section { padding-block: 2rem 6rem; }

/* Product page */
.product-page { display: grid; gap: 2rem; padding-block: 2rem 4rem; }
.product-gallery-panel { min-width: 0; }
.product-main-image { overflow: hidden; border-radius: var(--radius-large); background: linear-gradient(135deg, var(--primary-soft), var(--secondary-soft)); aspect-ratio: 1; box-shadow: var(--shadow-small); }
.product-main-image img { width: 100%; height: 100%; object-fit: cover; }
.product-thumbnails { display: flex; gap: .65rem; overflow-x: auto; padding-top: .75rem; }
.product-thumbnail { width: 74px; height: 74px; flex: 0 0 auto; overflow: hidden; border: 2px solid transparent; border-radius: 15px; background: var(--background-alt); padding: 0; cursor: pointer; }
.product-thumbnail.active { border-color: var(--primary); }
.product-thumbnail img { width: 100%; height: 100%; object-fit: cover; }
.product-information h1 { margin-bottom: .7rem; font-size: clamp(2.5rem, 7vw, 4.8rem); line-height: .98; }
.product-price { color: var(--primary); font-size: 1.8rem; font-weight: 900; }
.vat-product-detail { margin-top: -.65rem; }
.price-information { display: grid; justify-items: end; gap: .18rem; }
.vat-price-note { display: block; color: var(--text-light); font-size: .67rem; font-weight: 650; line-height: 1.35; }
.vat-rate-settings { display: grid; gap: .8rem; margin-top: .8rem; border-top: 1px solid var(--border); padding-top: .8rem; }
.vat-rate-settings p { margin: 0; color: var(--text-soft); line-height: 1.55; }
.vat-rate-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .45rem 1rem; }
.product-lead { color: var(--text-soft); font-size: 1.08rem; line-height: 1.75; }
.product-actions { display: flex; flex-wrap: wrap; gap: .7rem; margin-block: 1.4rem; }
.craft-facts { display: grid; gap: .7rem; border-block: 1px solid var(--border); padding-block: 1.1rem; }
.craft-facts > div { display: grid; grid-template-columns: auto 1fr; gap: .8rem; align-items: center; }
.craft-facts i { display: grid; width: 42px; height: 42px; place-items: center; border-radius: 50%; background: var(--background-alt); color: var(--primary); }
.craft-facts strong, .craft-facts small { display: block; }
.craft-facts small { color: var(--text-light); }
.product-description-section { margin-top: 2rem; }
.product-description-section h2 { font-size: 2rem; }
.product-detail-list { margin-top: 1.5rem; }

/* Profile */
.profile-page { min-height: 80svh; padding-block: 2rem 5rem; }
.profile-hero { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 1rem; border: 1px solid var(--border); border-radius: var(--radius-large); background: linear-gradient(135deg, var(--surface), var(--background-alt)); box-shadow: var(--shadow-small); padding: 1.25rem; }
.profile-avatar { width: 76px; height: 76px; }
.profile-hero h1 { margin-bottom: .2rem; font-size: 2rem; }
.profile-hero p { margin-bottom: 0; color: var(--text-light); }
.profile-hero .account-badge { grid-column: 1 / -1; width: fit-content; }
.profile-picture-editor { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 1rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--background-alt); padding: 1rem; }
.profile-picture-editor .field-group { margin: 0; }
.profile-picture-preview { width: 84px; height: 84px; flex: 0 0 84px; }
.profile-grid { display: grid; gap: 1rem; margin-top: 1.3rem; }
.settings-card { padding: 1.25rem; }
.settings-card header { margin-bottom: 1.2rem; }
.settings-card h2 { margin-bottom: 0; font-size: 1.8rem; }
.dashboard-summary { display: grid; gap: .7rem; }
.dashboard-summary > div { border-radius: var(--radius); background: var(--background-alt); padding: 1rem; }
.dashboard-summary strong { display: block; margin-bottom: .2rem; }
.dashboard-summary p { margin-bottom: 0; color: var(--text-soft); }

@media (min-width: 640px) {
  .header-container { grid-template-columns: auto 1fr; align-items: center; }
  .header-actions { grid-column: 1 / -1; }
  .card-grid, .event-grid, .loading-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .two-column-fields { grid-template-columns: 1fr 1fr; }
  .account-choice-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1.5fr 1fr 1fr; }
  .footer-grid section:last-child { grid-column: 1 / -1; }
  .footer-bottom { flex-direction: row; justify-content: space-between; }
  .profile-hero { grid-template-columns: auto 1fr auto; }
  .profile-hero .account-badge { grid-column: auto; }
}

@media (min-width: 900px) {
  .header-container { grid-template-columns: auto minmax(280px, 650px) 1fr; gap: 1.2rem; }
  .header-actions { grid-column: auto; }
  .primary-navigation {
    position: sticky;
    top: 78px;
    bottom: auto;
    left: auto;
    z-index: 900;
    width: min(100% - 32px, var(--content-width));
    height: 64px;
    margin: 16px auto 0;
    transform: none;
  }
  .nav-item { flex-direction: row; gap: .5rem; font-size: .82rem; }
  .nav-item i { font-size: 1rem; }
  .nav-item .badge { top: 7px; right: 8%; }
  .homepage-content { padding-bottom: 80px; }
  .site-footer { padding-bottom: 3rem; }
  .creator-banner { min-height: 280px; }
  .messaging-layout { display: grid; grid-template-columns: minmax(260px, 340px) 1fr; }
  .conversation-panel { border-right: 1px solid var(--border); border-bottom: 0; }
  .conversation-list { display: block; max-height: 590px; }
  .conversation-item { width: 100%; min-width: 0; border-right: 0; border-bottom: 1px solid var(--border); }
  .footer-grid { grid-template-columns: 1.5fr repeat(3, 1fr); }
  .footer-grid section:last-child { grid-column: auto; }
  .auth-layout { grid-template-columns: minmax(380px, 1.15fr) minmax(430px, .85fr); }
  .auth-visual { display: flex; }
  .register-grid { grid-template-columns: minmax(0, 1.15fr) minmax(330px, .85fr); align-items: stretch; }
  .workshop-preview { position: sticky; top: 1.5rem; min-height: 680px; }
  .detail-layout { grid-template-columns: minmax(0, 1fr) minmax(280px, 360px); }
  .detail-sidebar { position: sticky; top: 100px; align-self: start; }
  .product-page { grid-template-columns: minmax(0, 1fr) minmax(380px, .9fr); align-items: start; }
  .product-gallery-panel { position: sticky; top: 105px; }
  .profile-grid { grid-template-columns: minmax(0, 1.35fr) minmax(280px, .65fr); align-items: start; }
  .creator-dashboard { grid-column: 2; grid-row: 1 / span 2; }
}

@media (min-width: 1180px) {
  .card-grid, .event-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .hero-overlay { padding-block: 70px 100px; }
  .footer-grid { gap: 3rem; }
}

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

/* ==========================================================
   Révision marketplace — août 2026
   ========================================================== */
.brand-logo-image { display: block; width: 118px; max-height: 46px; object-fit: contain; }
[data-guest-only], [data-auth-only] { visibility: hidden; }
body.session-evaluated [data-guest-only], body.session-evaluated [data-auth-only] { visibility: visible; }
body.session-evaluated .hidden[data-guest-only], body.session-evaluated .hidden[data-auth-only] { display: none !important; }

/* Hero volontairement plus compact (~25 %). */
.hero { min-height: clamp(460px, 61vh, 640px); }

/* Les cartes s'ouvrent très légèrement sur leurs quatre côtés au survol. */
.creator-card:hover, .creation-card:hover {
  transform: scale(1.012) translateY(-2px);
}
.creation-image-link { position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.creation-image .card-floating-action { z-index: 2; }

@keyframes interaction-pulse {
  0% { box-shadow: 0 0 0 0 rgba(163, 63, 63, .48); border-color: var(--danger); }
  60% { box-shadow: 0 0 0 9px rgba(163, 63, 63, .10); border-color: rgba(163, 63, 63, .35); }
  100% { box-shadow: 0 0 0 14px rgba(163, 63, 63, 0); border-color: var(--border); }
}
.interaction-pulse { animation: interaction-pulse 1s ease-out both; }
.card-floating-action.active { background: var(--surface); color: var(--danger); border-color: var(--border); }
.card-floating-action.active i { color: var(--danger); }

.optional-field.hidden { display: none !important; }
.status-pill { display: inline-flex; align-items: center; gap: .4rem; width: fit-content; border-radius: 999px; padding: .42rem .72rem; background: var(--warning-soft); color: var(--warning); font-size: .8rem; font-weight: 800; }
.status-pill.ready { background: var(--success-soft); color: var(--success); }
.creator-tools { display: grid; gap: 1rem; }
.workshop-management-card { border: 1px solid var(--border); border-radius: var(--radius); background: var(--background-alt); padding: 1rem; }
.workshop-management-card summary { cursor: pointer; font-weight: 850; }
.workshop-management-card[open] summary { margin-bottom: 1rem; }
.help-note { border-left: 3px solid var(--secondary); border-radius: 8px; background: var(--secondary-soft); padding: .9rem 1rem; color: var(--primary-dark); font-size: .9rem; }
.responsibility-note { border: 1px solid #e5c597; border-radius: var(--radius); background: #fff4df; padding: 1rem; }
.theme-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem; }
.color-field input[type="color"] { width: 100%; min-height: 44px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); padding: .25rem; }

/* Panier */
.cart-page { min-height: 78svh; padding-block: 2rem 6rem; }
.cart-tabs { display: flex; gap: .5rem; overflow-x: auto; margin: 1rem 0 1.5rem; padding-bottom: .25rem; }
.cart-tab { border: 1px solid var(--border); border-radius: 999px; background: var(--surface); padding: .65rem 1rem; cursor: pointer; font-weight: 800; white-space: nowrap; }
.cart-tab.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.cart-panel { display: none; }
.cart-panel.active { display: block; }
.cart-layout { display: grid; gap: 1rem; }
.cart-group { border: 1px solid var(--border); border-radius: var(--radius-large); background: var(--surface); box-shadow: var(--shadow-small); overflow: hidden; }
.cart-group-header, .cart-group-footer { display: flex; justify-content: space-between; gap: 1rem; align-items: center; padding: 1rem 1.2rem; background: var(--background-alt); }
.cart-item { display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 1rem; align-items: center; padding: 1rem 1.2rem; border-top: 1px solid var(--border); }
.cart-item-image { width: 84px; height: 84px; border-radius: 16px; overflow: hidden; background: var(--background-alt); }
.cart-item-image img { width: 100%; height: 100%; object-fit: cover; }
.cart-item-main { display: grid; gap: .35rem; }
.cart-item-actions { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.cart-quantity { width: 74px; border: 1px solid var(--border); border-radius: 12px; padding: .55rem; }
.cart-summary { border: 1px solid var(--border); border-radius: var(--radius-large); background: var(--surface); box-shadow: var(--shadow-small); padding: 1.2rem; }
.cart-summary dl { margin: 0 0 1rem; }
.cart-summary dl div { display: flex; justify-content: space-between; gap: 1rem; padding: .45rem 0; }
.cart-summary .grand-total { border-top: 1px solid var(--border); margin-top: .4rem; padding-top: .8rem; font-size: 1.12rem; font-weight: 900; }
.order-history-card { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); padding: 1rem; margin-bottom: .75rem; }

/* Atelier : ambiance choisie par le créateur, bornée à quelques variables sûres. */
.workshop-themed { --workshop-background: var(--background); --workshop-surface: var(--surface); --workshop-primary: var(--primary); --workshop-secondary: var(--secondary); --workshop-text: var(--text); background: var(--workshop-background); color: var(--workshop-text); }
.workshop-themed .info-card, .workshop-themed .creation-card { background: var(--workshop-surface); }

.shared-mobile-navigation { display: flex; }
.nav-item.mobile-only { display: flex; }

@media (min-width: 900px) and (max-width: 1024px) {
  /* La navigation reste en bas sur tablette, comme demandé. */
  .primary-navigation { position: fixed; top: auto; bottom: calc(14px + env(safe-area-inset-bottom, 0px)); width: min(calc(100% - 18px), 720px); height: 70px; margin: 0; left: 50%; transform: translateX(-50%); }
  .nav-item { flex-direction: column; gap: 3px; font-size: .68rem; }
}

@media (max-width: 1024px) {
  .header-actions, .site-header.compact .back-link, .site-header.compact > .header-container > .button { display: none !important; }
  .header-container, .site-header.compact .header-container { grid-template-columns: auto minmax(0, 1fr); align-items: center; }
  .site-header.compact .compact-search-form { display: flex; }
  body { padding-bottom: 92px; }
  .site-footer { padding-bottom: 8rem; }
  .brand-logo-image { width: 96px; }
  .nav-item span { font-size: .62rem; }
}

@media (min-width: 1025px) {
  .shared-mobile-navigation, .nav-item.mobile-only { display: none !important; }
  .compact-search-form { display: none !important; }
  .primary-navigation { position: sticky; top: 78px; bottom: auto; left: auto; width: min(100% - 32px, var(--content-width)); height: 64px; margin: 16px auto 0; transform: none; }
  .nav-item { flex-direction: row; gap: .5rem; font-size: .82rem; }
  .cart-layout { grid-template-columns: minmax(0, 1fr) 320px; align-items: start; }
  .cart-summary { position: sticky; top: 104px; }
}

@media (max-width: 480px) {
  .back-link, .success-actions .button { font-size: .84rem; }
  .back-link { white-space: normal; max-width: 11rem; line-height: 1.18; }
  .success-actions .button[href*="index"] { max-width: 9.5rem; line-height: 1.15; }
  .theme-fields { grid-template-columns: 1fr; }
  .cart-item { grid-template-columns: 68px minmax(0, 1fr); padding-inline: .8rem; }
  .cart-item-image { width: 68px; height: 68px; }
}

/* ==========================================================
   Interface créateur, panier et correctifs de contrôle manuel
   ========================================================== */
.nav-icon-wrap { position: relative; display: inline-grid; place-items: center; }
.nav-badge { position: absolute; top: -8px; right: -12px; display: grid; min-width: 18px; height: 18px; place-items: center; border-radius: 999px; background: var(--danger); color: #fff; padding-inline: 4px; font-size: .62rem !important; font-weight: 900; }
.nav-badge.hidden { display: none !important; }
.active-interaction { color: var(--danger) !important; }
.active-interaction i { color: var(--danger); }

.section-header-inline, .creator-tool-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.creator-tool-block { display: grid; gap: 1rem; margin-top: 1rem; }
.creator-tool-heading h3 { margin: .45rem 0 0; }
.workshop-selector { display: flex; gap: .55rem; overflow-x: auto; padding: .35rem 0 .7rem; }
.workshop-selector-button { display: grid; grid-template-columns: auto 1fr; min-width: 190px; align-items: center; gap: .25rem .6rem; border: 1px solid var(--border); border-radius: 16px; background: var(--surface); padding: .75rem .9rem; text-align: left; cursor: pointer; }
.workshop-selector-button i { grid-row: span 2; color: var(--primary); }
.workshop-selector-button small { color: var(--text-light); }
.workshop-selector-button.active { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(111,78,55,.08); }
.management-panel { border: 1px solid var(--border); border-radius: 18px; background: var(--surface); padding: 1rem; }
.management-panel > summary { cursor: pointer; font-weight: 850; }
.management-panel[open] > summary { margin-bottom: .8rem; }
.theme-color-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .75rem; }
.theme-color-grid label { display: grid; gap: .4rem; color: var(--text-soft); font-size: .82rem; font-weight: 750; }
.theme-color-grid input[type="color"] { width: 100%; height: 46px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); padding: .2rem; }
.input-suffix { padding: 0 .85rem 0 .35rem; color: var(--text-light); font-weight: 800; }
.consent-box { align-items: flex-start; border: 1px solid var(--border); border-radius: 15px; background: var(--background-alt); padding: .9rem; }
.shipping-advice, .stripe-responsibility-notice { display: grid; grid-template-columns: auto 1fr; gap: .8rem; border: 1px solid #e5c597; border-radius: 16px; background: #fff4df; padding: 1rem; }
.shipping-advice i, .stripe-responsibility-notice i { margin-top: .15rem; color: #9a6a21; }
.shipping-advice p, .stripe-responsibility-notice p { margin: 0; line-height: 1.6; }
.checkbox-grid { display: flex; flex-wrap: wrap; gap: .5rem 1rem; }
.management-list { display: grid; gap: .65rem; margin-top: 1rem; }
.management-list-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; border: 1px solid var(--border); border-radius: 14px; padding: .85rem; background: var(--background-alt); }
.management-list-row strong, .management-list-row small { display: block; }
.management-list-row small { margin-top: .2rem; color: var(--text-light); }
.creator-order-card { overflow: hidden; border: 1px solid var(--border); border-radius: 14px; background: var(--background-alt); }
.creator-order-summary { display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 1rem; border: 0; background: transparent; padding: .9rem; color: inherit; text-align: left; cursor: pointer; }
.creator-order-summary:hover { background: rgba(111,78,55,.045); }
.creator-order-summary strong, .creator-order-summary small { display: block; }
.creator-order-summary small { margin-top: .2rem; color: var(--text-light); }
.creator-order-summary-state { display: flex; align-items: center; gap: .65rem; }
.creator-order-details { display: grid; gap: 1rem; border-top: 1px solid var(--border); background: var(--surface); padding: 1rem; }
.creator-order-items, .creator-order-totals { display: grid; gap: .65rem; margin: 0; }
.creator-order-item, .creator-order-totals > div { display: flex; align-items: start; justify-content: space-between; gap: 1rem; }
.creator-order-item { border-bottom: 1px dashed var(--border); padding-bottom: .65rem; }
.creator-order-item-main { display: flex; min-width: 0; align-items: center; gap: .75rem; }
.creator-order-item-image { width: 64px; height: 64px; flex: 0 0 64px; border: 1px solid var(--border); border-radius: 12px; background: var(--background-alt); object-fit: cover; }
.creator-order-item small { display: block; margin-top: .2rem; color: var(--text-light); }
.creator-order-totals > div { color: var(--text-soft); }
.creator-order-totals dt, .creator-order-totals dd { margin: 0; }
.creator-order-total { border-top: 1px solid var(--border); padding-top: .65rem; color: var(--text) !important; font-weight: 850; }
.creator-order-financial-note { margin: 0; border-radius: 10px; background: var(--background-alt); padding: .7rem; color: var(--text-light); font-size: .74rem; line-height: 1.5; }
@media (max-width: 640px) {
  .vat-rate-options { grid-template-columns: 1fr; }
  .creator-order-summary, .creator-order-item { align-items: stretch; flex-direction: column; }
  .creator-order-item-main { align-items: flex-start; }
  .creator-order-summary-state { justify-content: space-between; }
  .price-information { justify-items: start; }
}
.skeleton.slim { min-height: 86px; }
.status-pill.preparation { background: #fff4df; color: #8a5d1f; }
.stripe-status-grid { display: grid; gap: .55rem; margin: 1rem 0; }
.status-line { display: flex; justify-content: space-between; gap: 1rem; border-bottom: 1px solid var(--border); padding: .55rem 0; }
.button-row { display: flex; flex-wrap: wrap; gap: .65rem; margin-top: 1rem; }
.guest-join-link { margin-top: -1rem; text-align: center; }
.guest-join-link a { color: var(--primary); font-weight: 800; }

/* Nouveau panier */
.cart-heading { margin-bottom: .75rem; }
.cart-heading p { color: var(--text-soft); }
.cart-tab-panel.hidden { display: none !important; }
.cart-groups { display: grid; gap: 1rem; }
.cart-workshop-group { overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius-large); background: var(--surface); box-shadow: var(--shadow-small); }
.cart-group-header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; border-bottom: 1px solid var(--border); background: var(--background-alt); padding: 1rem 1.2rem; }
.cart-group-header h2 { margin: 0; font-size: 1.25rem; }
.shipping-chip { display: inline-flex; align-items: center; gap: .4rem; border-radius: 999px; background: var(--surface); padding: .45rem .7rem; color: var(--text-soft); font-size: .8rem; font-weight: 780; }
.cart-items { display: grid; }
.cart-item { grid-template-columns: 84px minmax(0,1fr) auto; }
.cart-item-copy { min-width: 0; }
.cart-item-copy a { color: inherit; text-decoration: none; }
.cart-item-copy strong, .cart-item-copy small, .cart-item-copy span { display: block; }
.cart-item-copy small { color: var(--text-light); margin: .25rem 0; }
.cart-item-actions { justify-content: flex-end; }
.cart-item-actions label { display: grid; gap: .25rem; color: var(--text-light); font-size: .72rem; }
.cart-item-actions input { width: 74px; border: 1px solid var(--border); border-radius: 10px; padding: .45rem; }
.danger-text { color: var(--danger); }
.cart-group-footer { display: grid; grid-template-columns: 1fr auto; border-top: 1px solid var(--border); padding: .9rem 1.2rem; background: var(--background-alt); }
.cart-group-footer span { color: var(--text-soft); }
.cart-summary { border: 0; background: transparent; box-shadow: none; padding: 0; }
.cart-summary-card { border: 1px solid var(--border); border-radius: var(--radius-large); background: var(--surface); box-shadow: var(--shadow-small); padding: 1.2rem; }
.cart-summary-card dl { display: grid; gap: .45rem; margin: 1rem 0; }
.cart-summary-card dl div { display: flex; justify-content: space-between; gap: 1rem; }
.cart-summary-card .cart-total { border-top: 1px solid var(--border); margin-top: .35rem; padding-top: .8rem; font-size: 1.1rem; font-weight: 900; }
.checkout-address-form { display: grid; gap: .8rem; border-top: 1px solid var(--border); padding-top: 1rem; }
.checkout-address-form h3 { margin: 0; font-size: 1rem; }
.checkout-address-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .65rem; }
.checkout-address-grid label { display: grid; gap: .3rem; color: var(--text-soft); font-size: .72rem; font-weight: 750; }
.checkout-address-grid label span { color: var(--text-light); font-weight: 500; }
.checkout-address-grid input { min-width: 0; width: 100%; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); padding: .62rem .7rem; color: var(--text); font: inherit; font-weight: 500; }
.checkout-address-grid input:focus { outline: 2px solid color-mix(in srgb,var(--primary) 25%,transparent); border-color: var(--primary); }
.checkout-address-grid .checkout-wide { grid-column: 1 / -1; }
.payment-note { margin-top: .9rem; color: var(--text-light); font-size: .78rem; line-height: 1.55; }
.payment-note i { color: var(--success); }
.purchase-history { display: grid; gap: .75rem; }
.purchase-order-card { display: flex; align-items: center; justify-content: space-between; gap: 1rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); padding: 1rem; }
.purchase-order-main h3 { margin: .45rem 0 .2rem; }
.purchase-order-main p { margin: 0; color: var(--text-soft); }
.purchase-order-meta { display: grid; gap: .3rem; text-align: right; }
.purchase-order-meta span { color: var(--text-light); font-size: .8rem; }

/* Évite les textes génériques visibles une fraction de seconde au rechargement. */
body[data-page="workshop"]:not(.content-ready) [data-workshop-name],
body[data-page="workshop"]:not(.content-ready) [data-workshop-tagline],
body[data-page="workshop"]:not(.content-ready) [data-workshop-category] { visibility: hidden; }
body[data-page="workshop"]:not(.content-ready) .detail-actions,
body[data-page="workshop"]:not(.content-ready) .detail-sidebar .button { visibility: hidden; }

/* Footer informatif, sans duplication de la navigation principale. */
@media (min-width: 1025px) { .footer-grid { grid-template-columns: 1.5fr repeat(2,1fr); } }

@media (max-width: 1024px) {
  .registration-header > .button { display: none !important; }
  .registration-header { display: grid; grid-template-columns: auto minmax(0,1fr); gap: .7rem; }
  .registration-header .compact-search-form { display: flex; }
  .profile-grid { display: grid; grid-template-columns: 1fr; }
  .creator-dashboard { grid-column: auto; grid-row: auto; }
}
@media (max-width: 700px) {
  .cart-item { grid-template-columns: 68px minmax(0,1fr); }
  .cart-item-actions { grid-column: 1 / -1; justify-content: space-between; border-top: 1px dashed var(--border); padding-top: .7rem; }
  .cart-group-header, .purchase-order-card { align-items: flex-start; flex-direction: column; }
  .purchase-order-meta { text-align: left; }
  .checkout-address-grid { grid-template-columns: 1fr; }
  .checkout-address-grid .checkout-wide { grid-column: auto; }
  .theme-color-grid { grid-template-columns: 1fr; }
}
.brand-preview-art img { position: relative; z-index: 2; width: min(82%, 360px); max-height: 190px; object-fit: contain; }
.footer-logo-image { width: 132px; }
.legal-page { padding-block: 2.5rem 6rem; }
.legal-document { margin-top: 1rem; border: 1px solid var(--border); border-radius: var(--radius-large); background: var(--surface); box-shadow: var(--shadow-small); padding: clamp(1rem,3vw,2rem); color: var(--text-soft); font-family: var(--font-body); font-size: .92rem; line-height: 1.7; white-space: pre-wrap; overflow-wrap: anywhere; }

/* Créations vendues / portfolio */
.sold-creation-card .creation-image{position:relative;filter:saturate(.88)}
.sold-ribbon{position:absolute;left:.8rem;bottom:.8rem;z-index:3;display:inline-flex;align-items:center;gap:.4rem;padding:.45rem .7rem;border-radius:999px;background:rgba(255,255,255,.92);backdrop-filter:blur(6px);font-size:.78rem;font-weight:700;box-shadow:0 6px 18px rgba(0,0,0,.12)}
.sold-creation-card .creation-image::after{content:"";position:absolute;inset:0;background:linear-gradient(180deg,transparent 60%,rgba(20,15,12,.18));pointer-events:none}

.purchase-order-items{margin-top:.9rem;display:grid;gap:.65rem}
.purchase-history-item{display:grid;grid-template-columns:56px 1fr auto;gap:.75rem;align-items:center;padding:.65rem;border:1px solid var(--border-color,#e8e1d8);border-radius:12px;background:rgba(255,255,255,.55)}
.purchase-history-item img{width:56px;height:56px;object-fit:cover;border-radius:10px}
.purchase-history-item span{display:grid;gap:.15rem}
@media(max-width:600px){.purchase-history-item{grid-template-columns:48px 1fr}.purchase-history-item .text-button{grid-column:1/-1;justify-self:start}}

/* ==========================================================
   Tags, recherche ciblée et découvertes personnalisées
   ========================================================== */
.search-scope-label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}
.search-scope {
  flex: 0 0 auto;
  max-width: 158px;
  border: 0;
  border-right: 1px solid var(--border);
  outline: 0;
  background: transparent;
  padding: .72rem 2rem .72rem .15rem;
  color: var(--text-soft);
  font: inherit;
  font-size: .82rem;
  font-weight: 800;
  cursor: pointer;
}
.search-scope:focus-visible {
  border-radius: 10px;
  box-shadow: 0 0 0 3px rgba(111, 78, 55, .12);
}
.compact-search-scope {
  max-width: 142px;
  padding-block: .62rem;
  font-size: .76rem;
}
.tag-list,
.detail-tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: .42rem;
  margin: .3rem 0 .95rem;
}
.tag-chip {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--background-alt);
  padding: .28rem .62rem;
  color: var(--text-soft);
  font-size: .74rem;
  font-weight: 780;
  line-height: 1.2;
  text-decoration: none;
  transition: border-color var(--transition), background var(--transition), color var(--transition), transform var(--transition);
}
.tag-chip::before { content: "#"; margin-right: .08rem; color: var(--secondary); }
.tag-chip:hover,
.tag-chip:focus-visible {
  border-color: var(--secondary);
  background: var(--secondary-soft);
  color: var(--primary-dark);
  transform: translateY(-1px);
}
.discovery-reason {
  display: flex;
  align-items: center;
  gap: .45rem;
  margin: -.25rem 0 .7rem;
  color: var(--primary);
  font-size: .76rem;
  font-weight: 800;
}
.discovery-reason i { color: var(--secondary); }
.discovery-group {
  display: grid;
  grid-column: 1 / -1 !important;
  gap: .85rem;
  min-width: 0;
}
.discovery-group > h3 {
  margin: .2rem 0 0;
  color: var(--text-soft);
  font-size: .88rem;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.discovery-group-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}
.detail-hero .detail-tag-list { margin-top: .8rem; }
.detail-hero .tag-chip {
  border-color: rgba(255,255,255,.28);
  background: rgba(255,255,255,.12);
  color: #fff;
  backdrop-filter: blur(8px);
}
.detail-hero .tag-chip::before { color: var(--secondary-soft); }
.product-information > .detail-tag-list { margin-top: -.2rem; }
.product-management-row { align-items: flex-start; }
.product-management-main { min-width: 0; flex: 1 1 auto; }
.inline-tag-form {
  display: flex;
  flex: 1 1 420px;
  align-items: end;
  justify-content: flex-end;
  gap: .55rem;
}
.inline-tag-form label {
  display: grid;
  flex: 1 1 300px;
  gap: .3rem;
  color: var(--text-light);
  font-size: .72rem;
  font-weight: 750;
}
.inline-tag-form input {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  padding: .55rem .65rem;
  color: var(--text);
}

@media (min-width: 720px) {
  .discovery-group-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 1080px) {
  .discovery-group-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 719px) {
  .search-scope { max-width: 110px; padding-right: 1.25rem; font-size: .72rem; }
  .compact-search-scope { max-width: 102px; }
  .management-list-row.product-management-row { align-items: stretch; flex-direction: column; }
  .inline-tag-form { width: 100%; align-items: stretch; flex-direction: column; }
}

/* ==========================================================
   Découvrir en rangées horizontales — août 2026
   ========================================================== */
body { overflow-x: hidden; }
.discovery-feed { min-width: 0; }
.discovery-topic-row {
  display: grid;
  width: 100%;
  min-width: 0;
  gap: .75rem;
  padding-bottom: .45rem;
}
.discovery-topic-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
}
.discovery-topic-header h3 { margin: .12rem 0 0; font-size: clamp(1.45rem, 3vw, 2rem); }
.discovery-row-controls { display: flex; flex: 0 0 auto; gap: .45rem; }
.discovery-row-arrow { width: 40px; height: 40px; }
.discovery-row-viewport {
  width: 100%;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-inline: contain;
  scrollbar-width: thin;
  scroll-snap-type: x proximity;
  padding: .2rem .15rem .85rem;
}
.discovery-row-track {
  display: flex;
  width: max-content;
  min-width: 100%;
  align-items: stretch;
  gap: 1rem;
}
.discovery-row-track .creator-card {
  display: flex;
  width: clamp(286px, 31vw, 360px);
  min-width: clamp(286px, 31vw, 360px);
  min-height: 610px;
  height: auto;
  flex: 0 0 clamp(286px, 31vw, 360px);
  flex-direction: column;
  scroll-snap-align: start;
}
.discovery-row-track .creator-banner {
  min-height: 228px;
  height: 228px;
  flex: 0 0 228px;
}
.discovery-row-track .creator-content {
  display: flex;
  min-height: 0;
  flex: 1 1 auto;
  flex-direction: column;
}
.discovery-row-track .creator-name,
.discovery-row-track .creator-job {
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
}
.discovery-row-track .creator-quote {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
}
.discovery-row-track .card-facts { margin-block: .65rem; }
.discovery-row-track .card-fact span { min-width: 0; }
.discovery-row-track .card-fact span:not(strong) { overflow-wrap: anywhere; }
.discovery-row-track .card-footer { margin-top: auto; }

/* Les résultats de recherche restent une grille régulière : aucune carte plus large qu'une autre. */
@media (min-width: 900px) {
  .discovery-feed:not(:has(.discovery-topic-row)) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .discovery-feed:not(:has(.discovery-topic-row)) > * { grid-column: auto !important; }
}

/* Logo plus présent et davantage ancré vers le bord de la fenêtre. */
.header-container {
  width: min(calc(100% - 12px), 1540px);
  gap: 10px;
  padding: 8px 0;
}
.brand-logo-image { width: 152px; max-height: 58px; }
@media (max-width: 1024px) {
  .brand-logo-image { width: 118px; max-height: 50px; }
}
@media (min-width: 1025px) {
  .primary-navigation { top: 74px; width: min(calc(100% - 12px), var(--content-width)); margin-top: 8px; }
}

/* Volets d'historique et gestion d'abonnement. */
.purchase-order-items.hidden { display: none !important; }
.subscription-management { display: grid; gap: 1rem; }
.subscription-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .7rem;
}
.subscription-summary > div { border-radius: var(--radius); background: var(--background-alt); padding: .9rem; }
.subscription-summary strong { display: block; margin-bottom: .2rem; }
.subscription-summary-link { color: inherit; text-decoration: none; border: 1px solid transparent; border-radius: var(--radius); }
.subscription-summary-link:hover, .subscription-summary-link:focus-visible { border-color: var(--primary); box-shadow: 0 8px 24px rgba(88, 61, 43, .10); }
.subscription-summary-link > div { border-radius: var(--radius); background: var(--background-alt); padding: .9rem; }
.subscription-actions { display: flex; flex-wrap: wrap; gap: .65rem; }
.subscription-warning { border-left: 3px solid var(--warning); border-radius: 10px; background: var(--warning-soft); padding: .9rem 1rem; }
.subscription-feedback-panel { border: 1px solid var(--border); border-radius: var(--radius); background: var(--background-alt); padding: 1rem; }
@media (max-width: 560px) {
  .discovery-row-controls { display: none; }
  .discovery-row-track .creator-card { width: min(86vw, 330px); min-width: min(86vw, 330px); min-height: 590px; height: auto; flex-basis: min(86vw, 330px); }
  .subscription-summary { grid-template-columns: 1fr; }
}
@media (min-width: 900px) {
  .profile-grid .creator-dashboard { grid-column: 2; grid-row: auto; }
}


/* 019 — facturation, délai de grâce et historique */
.billing-alert-backdrop{position:fixed;inset:0;z-index:2000;background:rgba(17,24,39,.58);display:grid;place-items:center;padding:20px}
.billing-alert-modal{position:relative;width:min(620px,100%);max-height:calc(100vh - 40px);overflow:auto;background:var(--surface,#fff);border-radius:20px;padding:28px;box-shadow:0 24px 70px rgba(0,0,0,.25)}
.billing-alert-modal h2{margin:.35rem 0 1rem}.billing-alert-close{position:absolute;top:12px;right:14px;border:0;background:transparent;font-size:1.8rem;cursor:pointer}.billing-alert-actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:20px}
.subscription-history{margin-top:24px;padding-top:20px;border-top:1px solid var(--border,#e5e7eb)}
.subscription-history h3{margin:0 0 12px}.subscription-invoice-row{display:flex;justify-content:space-between;gap:20px;padding:12px 0;border-bottom:1px solid var(--border,#e5e7eb)}
.subscription-invoice-row>div{display:flex;flex-direction:column;gap:3px}.subscription-invoice-row>div:last-child{text-align:right}
@media(max-width:640px){.billing-alert-modal{padding:24px 18px}.subscription-invoice-row{gap:10px}.subscription-invoice-row strong{font-size:.94rem}}


/* ==========================================================
   Correctif profil / atelier / en-tête — août 2026
   ========================================================== */

/* Profil : deux colonnes réellement lisibles sur grand écran. */
.profile-page {
  width: min(calc(100% - 32px), 1500px);
}
.profile-grid {
  grid-template-columns: 1fr;
  gap: 1.25rem;
}
.profile-column {
  display: grid;
  min-width: 0;
  align-content: start;
  gap: 1rem;
}
.profile-column .creator-dashboard {
  grid-column: auto !important;
  grid-row: auto !important;
}
.profile-side-column .settings-card,
.profile-main-column .settings-card {
  min-width: 0;
}
.profile-side-column .section-header-inline {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: .8rem;
}
.profile-side-column .section-header-inline > div { min-width: 0; }
.profile-side-column .section-header-inline .button { white-space: nowrap; }
.profile-side-column .workshop-selector-button {
  min-width: min(220px, 100%);
  max-width: 100%;
}
.profile-side-column .management-panel,
.profile-side-column .creator-tool-block,
.profile-side-column form { min-width: 0; }
.creator-product-entry-note {
  display: grid;
  gap: .75rem;
  border-radius: 14px;
  background: var(--background-alt);
  padding: .9rem;
}
.creator-product-entry-note p { margin: 0; color: var(--text-soft); line-height: 1.6; }
.creator-product-entry-note .button { justify-self: start; }

@media (min-width: 1120px) {
  .profile-grid {
    grid-template-columns: minmax(0, 1.08fr) minmax(440px, .92fr);
    align-items: start;
  }
}
@media (min-width: 900px) and (max-width: 1119px) {
  .profile-grid { grid-template-columns: 1fr !important; }
}
@media (max-width: 620px) {
  .profile-side-column .section-header-inline { grid-template-columns: 1fr; }
  .profile-side-column .section-header-inline .button { justify-self: start; }
}

/* Les volets de gestion restent fermés tant que le créateur ne les ouvre pas. */
.management-panel > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  list-style: none;
}
.management-panel > summary::-webkit-details-marker { display: none; }
.management-panel > summary::after {
  content: "+";
  display: grid;
  width: 1.7rem;
  height: 1.7rem;
  flex: 0 0 1.7rem;
  place-items: center;
  border-radius: 50%;
  background: var(--background-alt);
  color: var(--primary);
  font-size: 1.05rem;
  font-weight: 900;
}
.management-panel[open] > summary::after { content: "−"; }

/* Changement de formule : présentation volontairement discrète. */
.subscription-plan-change-panel {
  border-color: var(--border);
  background: linear-gradient(135deg, rgba(247,240,231,.82), rgba(255,255,255,.92));
  box-shadow: none;
}
.subscription-plan-change-panel .field-group { margin: 0; }
.subscription-plan-change-panel select {
  background-color: var(--surface);
  border-color: var(--border-strong);
}
.subscription-plan-change-panel .button-secondary {
  justify-self: start;
  box-shadow: none;
}
.subscription-card { border-color: rgba(197,138,58,.3); }

/* Gestion des créations directement dans l'atelier du créateur. */
.owner-product-management {
  scroll-margin-top: 165px;
  border-block: 1px solid rgba(230,221,212,.75);
  padding-block: 2rem;
}
.owner-creation-panel {
  margin-top: .9rem;
  background: rgba(255,255,255,.86);
  box-shadow: var(--shadow-small);
}
.owner-creation-panel > summary { justify-content: flex-start; }
.owner-creation-panel > summary::after { margin-left: auto; }
.owner-creation-panel > summary > i { color: var(--secondary); }
.owner-product-row { background: rgba(255,255,255,.78); }

/* Logo d'accueil : il occupe visuellement les deux niveaux recherche + navigation. */
@media (min-width: 1025px) {
  body[data-page="home"] .site-header { overflow: visible; }
  body[data-page="home"] .header-container {
    grid-template-columns: 240px minmax(320px, 650px) 1fr;
    align-items: center;
  }
  body[data-page="home"] .site-header .logo {
    position: relative;
    z-index: 1100;
    align-self: start;
    margin-top: -4px;
    margin-bottom: -70px;
  }
  body[data-page="home"] .site-header .brand-logo-image {
    width: 240px;
    height: 138px;
    max-height: none;
    object-fit: contain;
  }
  body[data-page="home"] .primary-navigation {
    width: min(calc(100% - 280px), 1260px);
    margin-right: 6px;
    margin-left: auto;
  }
}

/* ==========================================================
   021 — En-tête accueil : navigation centrée sous la recherche
   ========================================================== */
@media (min-width: 900px) {
  body[data-page="home"] .site-header .header-container {
    align-items: center;
  }

  /* La navigation fait désormais partie de la grille de l'en-tête. */
  body[data-page="home"] .site-header .primary-navigation {
    position: static;
    top: auto;
    bottom: auto;
    left: auto;
    transform: none;
    margin: 0;
  }
}

@media (min-width: 900px) and (max-width: 1024px) {
  body[data-page="home"] .site-header .primary-navigation {
    grid-column: 1 / -1;
    width: 100%;
  }
}

@media (min-width: 1025px) {
  body[data-page="home"] .site-header .header-container {
    grid-template-columns: 240px minmax(420px, 650px) minmax(240px, 1fr);
    grid-template-rows: auto auto;
    column-gap: 1.2rem;
    row-gap: 8px;
    padding-top: 8px;
    padding-bottom: 8px;
  }

  body[data-page="home"] .site-header .logo {
    grid-column: 1;
    grid-row: 1 / 3;
    align-self: stretch;
    margin: 0;
  }

  body[data-page="home"] .site-header .brand-logo-image {
    width: 240px;
    height: 100%;
    min-height: 118px;
    max-height: 138px;
    object-fit: contain;
  }

  body[data-page="home"] .site-header .search-form {
    grid-column: 2;
    grid-row: 1;
  }

  body[data-page="home"] .site-header .header-actions {
    grid-column: 3;
    grid-row: 1;
  }

  body[data-page="home"] .site-header .primary-navigation {
    grid-column: 2;
    grid-row: 2;
    width: 100%;
    height: 52px;
    justify-self: stretch;
    border-radius: 22px;
  }
}

/* ==========================================================
   022 — Accueil desktop : navigation jusqu'aux actions compte
   ========================================================== */
@media (min-width: 1025px) {
  body[data-page="home"] .site-header .header-container {
    /*
      1 = logo
      2 = recherche
      3 = espace souple entre la recherche et les actions
      4 = cloche / messages / favoris / profil

      La navigation occupe 2 + 3 : elle commence donc exactement sous
      la recherche et s'arrête avant la colonne des actions.
    */
    grid-template-columns:
      240px
      minmax(420px, 650px)
      minmax(0, 1fr)
      auto;
  }

  body[data-page="home"] .site-header .search-form {
    grid-column: 2;
    grid-row: 1;
  }

  body[data-page="home"] .site-header .header-actions {
    grid-column: 4;
    grid-row: 1;
    justify-self: end;
  }

  body[data-page="home"] .site-header .primary-navigation {
    grid-column: 2 / 4;
    grid-row: 2;
    width: 100%;
    justify-self: stretch;
  }
}


/* ==========================================================
   023 — Événements communautaires, préférences et atelier
   ========================================================== */
.communication-preferences {
  margin: .35rem 0 .6rem;
  padding: 1rem 1.05rem;
  border: 1px solid var(--line, #e7d9c7);
  border-radius: 16px;
  background: rgba(255, 250, 243, .58);
}
.communication-preferences legend {
  padding: 0 .35rem;
  font-weight: 800;
  color: var(--ink, #332820);
}
.communication-preferences > p {
  margin: 0 0 .75rem;
  color: var(--muted, #756b62);
  font-size: .92rem;
}
.communication-preferences .checkbox-row + .checkbox-row { margin-top: .65rem; }
.optional-label { font-size: .78rem; font-weight: 600; color: var(--muted, #756b62); }

.public-data-deletion { margin-top: 1.4rem; padding: 1.1rem; border: 1px solid rgba(163, 63, 63, .45); border-radius: var(--radius); background: var(--danger-soft); }
.public-data-deletion-heading { display: flex; align-items: center; gap: .8rem; }
.public-data-deletion-heading > i { color: var(--danger); font-size: 1.35rem; }
.public-data-deletion-heading h3 { margin: .15rem 0 .35rem; }
.public-data-deletion p { color: #6e2929; }
.public-data-deletion-check { margin: 1rem 0; color: #6e2929; font-weight: 700; }
.public-data-deletion .button-danger { border-color: var(--danger); background: var(--danger); color: #fff; }
.public-data-deletion .button-danger:hover:not(:disabled) { filter: brightness(.92); }
.public-data-deletion .button-danger:disabled { cursor: not-allowed; opacity: .48; }
.public-data-deletion-status { margin-bottom: .8rem; border-radius: 10px; background: rgba(255,255,255,.72); padding: .8rem; }

.owner-quick-create {
  display: flex;
  justify-content: flex-start;
  padding-top: 1rem;
  padding-bottom: .1rem;
}
.owner-quick-create.hidden { display: none; }
.owner-quick-create .button { box-shadow: 0 8px 26px rgba(88, 61, 43, .08); }

.event-preparation-state {
  min-height: 180px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 1rem;
  padding: 2.25rem;
  border: 1px solid var(--line, #e7d9c7);
  border-radius: 22px;
  background: rgba(255, 250, 243, .72);
  text-align: center;
}
.event-preparation-state i { font-size: 1.65rem; color: var(--accent, #b97625); }
.event-preparation-state p { max-width: 720px; margin: 0; font-size: 1.03rem; }

.event-calendar-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .65rem;
  margin-bottom: 1rem;
}
.event-calendar-strip span {
  padding: .75rem .8rem;
  border-radius: 14px;
  background: rgba(185, 118, 37, .09);
  border: 1px solid rgba(185, 118, 37, .16);
  font-size: .82rem;
  font-weight: 700;
  text-align: center;
}
.community-event-phase,
.event-suggestion-panel {
  border: 1px solid var(--line, #e7d9c7);
  border-radius: 20px;
  background: #fffdfa;
  padding: 1.25rem;
}
.event-suggestion-panel { margin-top: 1rem; }
.event-suggestion-panel summary { cursor: pointer; font-weight: 800; }
.event-choice-grid,
.event-participant-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: .85rem;
  margin-top: 1rem;
}
.event-choice-card,
.event-participant-card {
  border: 1px solid var(--line, #e7d9c7);
  border-radius: 16px;
  padding: 1rem;
  background: rgba(255, 250, 243, .56);
}
.event-choice-card h4,
.event-participant-card h4 { margin-top: 0; }
.event-inline-form {
  display: grid;
  gap: .85rem;
  margin-top: 1rem;
}
.event-inline-form label { display: grid; gap: .35rem; font-weight: 700; }
.event-inline-form input,
.event-inline-form select {
  width: 100%;
  border: 1px solid var(--line, #e0d1be);
  border-radius: 12px;
  padding: .72rem .8rem;
  background: #fff;
  color: inherit;
}
.creator-week-public-card {
  max-width: 760px;
  padding: 1.2rem 0;
}
.creator-week-public-card h3 { margin: .45rem 0 .6rem; }
.creator-week-public-card p { max-width: 650px; }

@media (max-width: 800px) {
  .event-calendar-strip { grid-template-columns: 1fr 1fr; }
  .owner-quick-create { justify-content: stretch; }
  .owner-quick-create .button { width: 100%; }
}
@media (max-width: 520px) {
  .event-calendar-strip { grid-template-columns: 1fr; }
}

/* ==========================================================
   024 — UX 021 : recherche, profil latéral, carrousels et chrome fixe
   ========================================================== */

/* La loupe clôt toujours visuellement la barre de recherche. */
.search-form > .search-scope { order: 1; }
.search-form > select[name="region"] { order: 2; }
.search-form > input[type="search"] { order: 10; }
.search-form > button[type="submit"],
.search-form > .search-button { order: 99; }
.search-form > .search-clear { order: 98; }

/* Filtre région : aspect de petit filtre contextuel. */
.search-chip-input {
  flex: 0 1 135px;
  min-width: 88px !important;
  max-width: 155px;
  align-self: center;
  margin: 5px 3px;
  border: 1px solid var(--border) !important;
  border-radius: 999px;
  background: var(--background-alt) !important;
  padding: .48rem .72rem !important;
  font-size: .78rem;
}
.search-chip-input:focus {
  border-color: var(--secondary) !important;
  background: var(--surface) !important;
}

/* Profil / paramètres : navigation latérale. */
.profile-settings-layout {
  display: grid;
  grid-template-columns: minmax(215px, 255px) minmax(0, 1fr);
  gap: 1.25rem;
  align-items: start;
  margin-top: 1.25rem;
}
.profile-settings-menu {
  position: sticky;
  top: 1rem;
  display: grid;
  gap: .42rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-large);
  background: rgba(255,255,255,.86);
  box-shadow: var(--shadow-small);
  padding: 1rem;
}
.profile-settings-menu > .eyebrow { margin: .1rem .4rem .55rem; }
.profile-menu-item {
  display: flex;
  width: 100%;
  align-items: center;
  gap: .72rem;
  border: 1px solid transparent;
  border-radius: 13px;
  background: transparent;
  color: var(--text-soft);
  padding: .72rem .78rem;
  text-align: left;
  font-weight: 760;
  cursor: pointer;
}
.profile-menu-item i { width: 1.1rem; color: var(--secondary); text-align: center; }
.profile-menu-item:hover { background: var(--background-alt); color: var(--primary); }
.profile-menu-item.active {
  border-color: rgba(111,78,55,.14);
  background: var(--primary-soft);
  color: var(--primary-dark);
}
.profile-settings-panels { min-width: 0; }
.profile-settings-panel { margin: 0; }
.profile-settings-panel + .profile-settings-panel:not(.hidden) { margin-top: 1rem; }
.settings-separator { border: 0; border-top: 1px solid var(--border); margin: 1.5rem 0; }

/* Créateur de la semaine : vraie mise en scène éditoriale. */
.creator-week-showcase {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, .8fr);
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 28px;
  background: var(--surface);
  box-shadow: var(--shadow-medium);
}
.creator-week-visuals {
  position: relative;
  min-height: 430px;
  overflow: hidden;
  background: var(--background-alt);
}
.creator-week-slide {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  transition: opacity .55s ease;
  pointer-events: none;
}
.creator-week-slide.active { opacity: 1; pointer-events: auto; }
.creator-week-slide img { width: 100%; height: 100%; object-fit: cover; }
.creator-week-dots,
.hero-dots {
  position: absolute;
  z-index: 3;
  left: 50%;
  bottom: 16px;
  display: flex;
  gap: 7px;
  transform: translateX(-50%);
}
.creator-week-dot,
.hero-dot {
  width: 9px;
  height: 9px;
  border: 0;
  border-radius: 50%;
  background: rgba(255,255,255,.58);
  box-shadow: 0 0 0 1px rgba(33,24,17,.15);
  padding: 0;
  cursor: pointer;
}
.creator-week-dot.active,
.hero-dot.active { width: 24px; border-radius: 999px; background: white; }
.creator-week-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: .75rem;
  padding: clamp(1.5rem, 4vw, 3.25rem);
}
.creator-week-copy h3 { margin: 0; font-size: clamp(1.9rem, 3vw, 3rem); }
.creator-week-copy h3 a { color: inherit; text-decoration: none; }
.creator-week-copy blockquote {
  margin: .4rem 0 .8rem;
  border-left: 3px solid var(--secondary);
  padding-left: 1rem;
  color: var(--text-soft);
  font-family: var(--font-display);
  font-size: 1.08rem;
  line-height: 1.65;
}
.creator-week-tagline { color: var(--text-soft); }

/* Modal de préparation du créateur de la semaine. */
.creator-week-prompt-backdrop {
  position: fixed;
  z-index: 4000;
  inset: 0;
  display: grid;
  place-items: center;
  overflow: auto;
  background: rgba(31,23,18,.58);
  padding: 1rem;
  backdrop-filter: blur(4px);
}
.creator-week-prompt {
  width: min(920px, 96vw);
  max-height: 92vh;
  overflow: auto;
  border-radius: 24px;
  background: var(--surface);
  box-shadow: var(--shadow-large);
  padding: clamp(1.25rem, 3vw, 2.1rem);
}
.creator-week-image-options {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: .7rem;
}
.creator-week-image-choice {
  position: relative;
  display: grid;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--background-alt);
  cursor: pointer;
}
.creator-week-image-choice img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.creator-week-image-choice input { position: absolute; top: 8px; left: 8px; }

/* Bouton global de retour au début. */
.scroll-top-button {
  position: fixed;
  z-index: 1800;
  right: 18px;
  bottom: 64px;
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255,255,255,.94);
  box-shadow: var(--shadow-medium);
  color: var(--primary);
  padding: .65rem .85rem;
  font-weight: 800;
  cursor: pointer;
  backdrop-filter: blur(12px);
}
.scroll-top-button:hover { transform: translateY(-2px); }

.shared-site-footer {
  margin-top: 4rem;
  border-top: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-soft);
}
.shared-site-footer-inner {
  display: flex;
  width: min(calc(100% - 28px), var(--content-width));
  min-height: 118px;
  margin-inline: auto;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 1.4rem;
}
.shared-site-footer img { width: 128px; }
.shared-site-footer p { margin: 0; text-align: center; }
.shared-site-footer span { white-space: nowrap; font-size: .82rem; }
/* En-tête réellement fixe hors page Profil/Paramètres. */
@media (min-width: 900px) {
  body:not([data-page="profile"]) .site-header {
    position: fixed;
    right: 0;
    left: 0;
    width: 100%;
  }
  body[data-page="home"] { padding-top: 144px; }
  body:not([data-page="home"]):not([data-page="profile"]):not([data-page="login"]):not([data-page="register"]):not([data-page="verify-email"]) { padding-top: 144px; }
}

/* L'atelier doit rester confortable quand le header est fixe. */
#workshop-creations { scroll-margin-top: 100px; }
.owner-quick-create { padding-top: 1rem; }

/* Cartes : zones visuelles et titres clairement interactifs. */
.creator-banner .card-image-link,
.creation-image-link { cursor: pointer; }
.creator-name a,
.creation-title a { color: inherit; text-decoration: none; }
.creator-name a:hover,
.creation-title a:hover { color: var(--primary); text-decoration: underline; text-underline-offset: 3px; }

/* Réglages abonnement : trois offres mensuelles, pas de langage annuel. */
.subscription-plan-change-panel { max-width: 620px; }

@media (max-width: 980px) {
  .profile-settings-layout { grid-template-columns: 1fr; }
  .profile-settings-menu {
    position: static;
    display: flex;
    overflow-x: auto;
    gap: .35rem;
    padding: .65rem;
    scrollbar-width: thin;
  }
  .profile-settings-menu > .eyebrow { display: none; }
  .profile-menu-item { flex: 0 0 auto; width: auto; white-space: nowrap; }
  .creator-week-showcase { grid-template-columns: 1fr; }
  .creator-week-visuals { min-height: 360px; }
}

@media (max-width: 899px) {
  .scroll-top-button { bottom: calc(92px + env(safe-area-inset-bottom, 0px)); }
  .scroll-top-button span { display: none; }
  .search-chip-input { flex-basis: 95px; max-width: 110px; }
}

@media (max-width: 520px) {
  .profile-picture-editor { grid-template-columns: 1fr; }
}

/* En-tête complet des pages Atelier, Fiche article et Formules. */
@media (min-width: 1025px) {
  body:not([data-page="home"]):not([data-page="profile"]) .site-header .header-container {
    grid-template-columns: 168px auto minmax(420px, 1fr) auto;
    grid-template-rows: auto auto;
    align-items: center;
    column-gap: 1rem;
    row-gap: 8px;
  }
  body:not([data-page="home"]):not([data-page="profile"]) .site-header .logo { grid-column: 1; grid-row: 1 / 3; }
  body:not([data-page="home"]):not([data-page="profile"]) .site-header .back-link { grid-column: 2; grid-row: 1; }
  body:not([data-page="home"]):not([data-page="profile"]) .site-header .search-form { display: flex !important; grid-column: 3; grid-row: 1; }
  body:not([data-page="home"]):not([data-page="profile"]) .site-header .header-actions { grid-column: 4; grid-row: 1; }
  body:not([data-page="home"]):not([data-page="profile"]) .site-header .primary-navigation {
    position: static;
    grid-column: 3 / 5;
    grid-row: 2;
    width: 100%;
    height: 50px;
    margin: 0;
    transform: none;
    border-radius: 20px;
  }
}

@media (min-width: 1025px) {
  body[data-page="home"] .site-header .search-form { grid-column: 2 / 4; }
}

/* Hero d'accueil élargi : plus de place pour l'image et deux zones de lecture. */
.hero { min-height: clamp(480px, 58vh, 620px); }
.hero-background { background-position: center center !important; }
.hero-overlay { padding-block: 28px 42px; }
.hero h1 { font-size: clamp(2.1rem, 5vw, 4.1rem); }
.hero-buttons { margin-top: 1rem; }

.search-filter-select {
  min-width: 0;
  border: 0;
  border-right: 1px solid var(--border);
  outline: 0;
  background: transparent;
  padding: .72rem 1.65rem .72rem .55rem;
  color: var(--text-soft);
  font: inherit;
  font-size: .76rem;
  font-weight: 750;
}
.criteria-chip-list { display: flex; flex-wrap: wrap; gap: .28rem; margin-top: .25rem; }
.criteria-chip {
  display: inline-flex;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--background-alt);
  color: var(--primary);
  padding: .15rem .45rem;
  font-size: .72rem;
  font-weight: 780;
  text-decoration: none;
}
.criteria-chip:hover { border-color: var(--secondary); background: var(--secondary-soft); }

.material-option-grid { display: flex; flex-wrap: wrap; gap: .45rem; margin-block: .45rem .8rem; }
.material-option { position: relative; cursor: pointer; }
.material-option input { position: absolute; opacity: 0; pointer-events: none; }
.material-option span { display: inline-flex; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); padding: .42rem .68rem; color: var(--text-soft); font-size: .78rem; font-weight: 760; }
.material-option input:checked + span { border-color: var(--secondary); background: var(--secondary-soft); color: var(--primary-dark); box-shadow: 0 0 0 2px rgba(197,138,58,.12); }
.material-register-fieldset { margin: .4rem 0 1rem; border: 1px solid var(--border); border-radius: 16px; padding: 1rem; }

.workshop-background-preview {
  position: relative;
  display: grid;
  min-height: 0;
  place-items: end start;
  overflow: hidden;
  border-radius: 18px;
  background: var(--primary-soft) center / cover no-repeat;
  box-shadow: inset 0 -90px 90px rgba(20,15,12,.42);
  padding: 1rem;
  color: white;
  font-weight: 850;
}
.workshop-background-preview::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(24,17,13,.66), rgba(24,17,13,.08) 72%);
  content: "";
  pointer-events: none;
}
.workshop-background-preview span { position: relative; z-index: 1; text-shadow: 0 1px 6px rgba(0,0,0,.65); }
.workshop-background-previews { display: grid; gap: 1rem; }
.workshop-background-preview-block { display: grid; gap: .4rem; }
.workshop-background-preview-block > strong { color: var(--primary-dark); font-size: .8rem; }
.workshop-background-preview-block > small { color: var(--text-light); font-size: .72rem; }
.workshop-background-preview-hero { aspect-ratio: 16 / 5; }
.workshop-background-preview-card { max-width: 360px; aspect-ratio: 3 / 2; }
.work-in-progress-media { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: .65rem; }
.work-in-progress-media figure { position: relative; margin: 0; overflow: hidden; border-radius: 14px; aspect-ratio: 1; background: var(--primary-soft); }
.work-in-progress-media img { width: 100%; height: 100%; object-fit: cover; }
.work-in-progress-media .icon-button { position: absolute; top: .4rem; right: .4rem; background: rgba(255,255,255,.92); color: var(--danger); }
.owner-work-in-progress-panel { margin-top: 1rem; }
.owner-work-in-progress-panel > summary { display: flex; align-items: center; gap: .55rem; }
.wip-conversion-actions { display: flex; flex-wrap: wrap; gap: .7rem; align-items: center; }
.wip-reuse-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: .65rem; }
.wip-reuse-option { position: relative; display: block; margin: 0; border: 1px solid var(--border); border-radius: 14px; overflow: hidden; aspect-ratio: 1; background: var(--primary-soft); cursor: pointer; }
.wip-reuse-option input { position: absolute; top: .5rem; left: .5rem; z-index: 2; width: 1.15rem; height: 1.15rem; }
.wip-reuse-option img { width: 100%; height: 100%; object-fit: cover; display: block; }
.wip-reuse-option span { display: block; width: 100%; height: 100%; }
.wip-reuse-option:has(input:not(:checked)) img { opacity: .42; }
.inline-image-form { display: flex; flex-wrap: wrap; align-items: end; gap: .55rem; margin-top: .7rem; }
.inline-image-form label { display: grid; gap: .25rem; color: var(--text-soft); font-size: .76rem; font-weight: 760; }
.product-tag-picker { margin: 0; border: 0; padding: 0; }
.product-tag-picker legend, .inline-tag-form legend { color: var(--text-soft); font-size: .78rem; font-weight: 800; }
.inline-tag-form fieldset { min-width: min(420px, 100%); margin: 0; border: 0; padding: 0; }
.product-management-thumbnail { width: 76px; height: 76px; flex: 0 0 76px; border-radius: 12px; object-fit: cover; background: var(--primary-soft); }
.hero-review-management-panel h4 { margin: 0 0 .4rem; }
.workshop-featured-review {
  max-width: 620px;
  margin: 1.25rem 0 0;
  border-left: 2px solid rgba(255,255,255,.7);
  border-radius: 0 12px 12px 0;
  background: rgba(30,22,16,.28);
  padding: .72rem .9rem;
  color: rgba(255,255,255,.94);
  backdrop-filter: blur(7px);
}
.workshop-featured-review span, .workshop-featured-review small { display: block; }
.workshop-featured-review span { line-height: 1.45; }
.workshop-featured-review small { margin-top: .3rem; color: rgba(255,255,255,.76); font-size: .76rem; font-weight: 760; }
.product-back-workshop { margin-bottom: 1.2rem; }

.subscription-plans-page { padding-block: 3rem 7rem; }
.subscription-plans-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 1rem; }
.subscription-choice-card { display: flex; min-height: 410px; flex-direction: column; border: 1px solid var(--border); border-radius: 24px; background: var(--surface); box-shadow: var(--shadow-small); padding: 1.35rem; }
.subscription-choice-card h2 { margin-top: .55rem; font-size: 1.65rem; }
.subscription-choice-card ul { display: grid; gap: .6rem; margin: 1rem 0 1.5rem; padding-left: 1.2rem; color: var(--text-soft); }
.subscription-plan-advice { margin-top: auto; border-top: 1px solid var(--border); padding-top: 1rem; color: var(--text-soft); font-size: .92rem; line-height: 1.55; }
.subscription-choice-card .subscription-plan-advice + .button { margin-top: 1rem; }
.subscription-choice-card .button { margin-top: auto; }
.subscription-choice-card.current-plan { opacity: .6; transform: scale(.975); background: var(--background-alt); box-shadow: none; }
.session-security-modal a { color: var(--primary); font-weight: 800; }

.commission-overview { overflow: hidden; }
.commission-gauge { margin: .9rem 0 1.1rem; }
.commission-gauge-track { height: 16px; overflow: hidden; border: 1px solid var(--border); border-radius: 999px; background: var(--background-alt); }
.commission-gauge-track span { display: block; min-width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--primary), var(--secondary)); transition: width .25s ease; }
.commission-gauge-legend { display: flex; justify-content: space-between; gap: .8rem; margin-top: .5rem; color: var(--text-soft); font-size: .84rem; }
.commission-gauge-legend strong { color: var(--text); }
.commission-advisor { margin-top: 1.25rem; border: 1px solid var(--border); border-radius: 18px; background: var(--background-alt); padding: 1rem; }
.commission-advisor-heading { display: flex; align-items: end; justify-content: space-between; gap: 1rem; }
.commission-advisor-heading h4 { margin: .2rem 0 0; }
.commission-advisor-heading > strong { white-space: nowrap; }
.commission-advisor-controls { display: grid; grid-template-columns: minmax(0,1fr) 180px; align-items: center; gap: 1rem; margin: 1rem 0; }
.commission-advisor-controls input[type="range"] { width: 100%; accent-color: var(--primary); cursor: pointer; }
.commission-advisor-controls label { display: grid; gap: .3rem; color: var(--text-soft); font-size: .78rem; font-weight: 800; }
.commission-advisor-controls input[type="number"] { width: 100%; border: 1px solid var(--border-strong); border-radius: 10px; background: var(--surface); padding: .55rem .65rem; color: var(--text); }
.commission-advisor-results { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: .65rem; }
.commission-advisor-result { display: grid; gap: .25rem; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); padding: .75rem; }
.commission-advisor-result span { color: var(--text-soft); font-size: .78rem; font-weight: 760; }
.commission-advisor-result.best { border-color: var(--secondary); box-shadow: 0 0 0 2px rgba(197,138,58,.12); }
.commission-advisor-result.current span::before { content: "● "; color: var(--primary); }
.commission-advisor-recommendation { margin: .9rem 0 .35rem; }
.commission-advisor-thresholds { margin: 0; color: var(--text-soft); font-size: .78rem; line-height: 1.5; }

@media (max-width: 760px) {
  .commission-gauge-legend, .commission-advisor-heading { align-items: flex-start; flex-direction: column; }
  .commission-advisor-controls { grid-template-columns: 1fr; }
  .commission-advisor-results { grid-template-columns: 1fr; }
  .shared-site-footer-inner { flex-direction: column; text-align: center; }
  .work-in-progress-media, .wip-reuse-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .subscription-plans-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .creator-week-visuals { min-height: 290px; }
  .creator-week-copy { padding: 1.3rem; }
  .search-chip-input { display: none; }
}

@media (min-width: 1100px) {
  .compact-search-form .compact-filter-input { display: block; flex-basis: 105px; max-width: 120px; }
}
@media (max-width: 1099px) {
  .compact-search-form .compact-filter-input { display: none; }
}


/* ==========================================================
   Bannière d'accueil — composition éditoriale
   ========================================================== */
@media (min-width: 900px) {
  .hero {
    height: clamp(480px, 31.25vw, 620px);
    min-height: 0;
  }
  .hero > .hero-overlay { height: 100%; }
  .workshop-detail-hero { min-height: clamp(480px, 31.25vw, 620px); }
  .workshop-background-previews { grid-template-columns: minmax(0, 2fr) minmax(230px, 1fr); align-items: end; }
}

@media (max-width: 899px) {
  .hero { min-height: 540px; }
  .hero-content.page-shell { padding-inline: 24px; }
  .hero-overlay {
    background: linear-gradient(90deg, rgba(24,17,13,.86), rgba(24,17,13,.46));
  }
  .hero.hero-workshop-slide .hero-overlay {
    background:
      linear-gradient(90deg, rgba(24,17,13,.70), rgba(24,17,13,.20) 82%),
      linear-gradient(180deg, rgba(24,17,13,.46), transparent 48%, rgba(24,17,13,.64));
  }
  .hero.hero-platform-slide .hero-background {
    background-position: 68% center !important;
    background-size: cover;
  }
  .hero.hero-platform-slide .hero-overlay { padding-bottom: 86px; }
  .hero-ai-disclosure {
    right: 14px;
    bottom: 12px;
    max-width: min(330px, calc(100% - 28px));
    font-size: .66rem;
  }
}

/* ==========================================================
   022 — Sélecteur accessible « Je façonne »
   ========================================================== */
.crafted-picker-field { position: relative; }
.crafted-combobox { position: relative; }
.crafted-selected { display: flex; flex-wrap: wrap; gap: .45rem; margin-bottom: .45rem; min-height: 0; }
.crafted-selected:empty { display: none; }
.crafted-chip { display: inline-flex; align-items: center; gap: .35rem; padding: .34rem .55rem; border: 1px solid var(--border); border-radius: 999px; background: var(--background-alt); font-size: .82rem; font-weight: 700; }
.crafted-chip button { border: 0; background: transparent; cursor: pointer; font: inherit; line-height: 1; color: var(--text-light); padding: 0 .05rem; }
.crafted-search-row { display: grid; grid-template-columns: 1fr auto; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); overflow: hidden; }
.crafted-search-row:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 14%, transparent); }
.crafted-search-row input { border: 0 !important; box-shadow: none !important; border-radius: 0 !important; min-width: 0; }
.crafted-toggle { width: 44px; border: 0; border-left: 1px solid var(--border); background: transparent; cursor: pointer; color: var(--text); }
.crafted-options { position: absolute; z-index: 50; left: 0; right: 0; top: calc(100% + .35rem); max-height: 270px; overflow-y: auto; padding: .35rem; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); box-shadow: 0 14px 38px rgba(31, 24, 19, .14); }
.crafted-option { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: .8rem; padding: .62rem .72rem; border: 0; border-radius: 10px; background: transparent; color: var(--text); text-align: left; cursor: pointer; font: inherit; }
.crafted-option:hover, .crafted-option.active { background: var(--background-alt); }
.crafted-option.selected { font-weight: 800; color: var(--primary); }
.crafted-empty { margin: .5rem; color: var(--text-light); font-size: .88rem; }

.creator-upgrade-prompt { margin: 1.4rem 0; padding: 1.15rem; border: 1px solid var(--border); border-radius: var(--radius); background: linear-gradient(135deg, var(--background-alt), #fff); display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.creator-upgrade-copy h2, .creator-upgrade-copy h3 { margin: .2rem 0 .45rem; }
.creator-upgrade-copy p { margin: 0; color: var(--text-soft); max-width: 70ch; }
.creator-upgrade-actions { display: flex; flex-wrap: wrap; gap: .65rem; flex: 0 0 auto; }
.workshop-visibility-settings { margin-top: 1.4rem; padding: 1.1rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--background-alt); }
.workshop-visibility-heading { display: flex; align-items: center; gap: .8rem; }
.workshop-visibility-heading > i { color: var(--primary); font-size: 1.25rem; }
.workshop-visibility-heading h3 { margin: .15rem 0 .35rem; }
.workshop-visibility-settings p { color: var(--text-soft); }
@media (max-width: 720px) { .creator-upgrade-prompt { align-items: stretch; flex-direction: column; } .creator-upgrade-actions { flex-direction: column; } .creator-upgrade-actions .button { width: 100%; } }


/* Correctif 064 — quantité produit, déconnexion et alertes de commandes */
.card-purchase-actions, .product-purchase-actions { display:flex; align-items:center; gap:.65rem; flex-wrap:wrap; }
.card-purchase-actions { margin-top:.85rem; padding-top:.85rem; border-top:1px solid var(--border); }
.product-card-quantity, .product-detail-quantity { display:inline-flex; align-items:center; gap:.4rem; font-size:.82rem; font-weight:700; color:var(--text-soft); white-space:nowrap; }
.product-card-quantity input, .product-detail-quantity input { width:4.6rem; min-height:2.45rem; padding:.45rem .55rem; border:1px solid var(--border); border-radius:12px; background:var(--surface); color:var(--text); text-align:center; font:inherit; }
.product-card-quantity input:focus, .product-detail-quantity input:focus { outline:2px solid color-mix(in srgb, var(--accent) 45%, transparent); outline-offset:2px; }
.header-logout-button { flex:0 0 auto; }
.profile-chip { position:relative; }
.profile-order-badge { display:inline-flex; align-items:center; justify-content:center; min-width:1.25rem; height:1.25rem; padding:0 .3rem; border-radius:999px; background:#a3372f; color:#fff; font-size:.7rem; font-weight:800; line-height:1; box-shadow:0 0 0 2px var(--surface, #fff); }
.profile-chip .profile-order-badge { position:absolute; top:-.38rem; right:-.38rem; }
.profile-menu-item .profile-menu-badge { margin-left:auto; position:static; box-shadow:none; }
.nav-icon-wrap .profile-order-badge { position:absolute; top:-.45rem; right:-.7rem; }
.creator-orders-shipping-note { margin:.75rem 0 1rem; align-items:flex-start; }
.notification-action { display:inline-flex; margin-top:.35rem; }
@media (max-width: 720px) {
  .card-purchase-actions { align-items:stretch; }
  .card-purchase-actions .button { flex:1 1 auto; }
  .product-purchase-actions { width:100%; }
}

/* 065 — adresses de livraison distinctes par atelier */
.workshop-shipping-overrides { display:grid; gap:.75rem; border-top:1px solid var(--border); padding-top:.9rem; }
.workshop-shipping-overrides > div > strong { font-size:.9rem; }
.workshop-shipping-override { display:grid; gap:.65rem; border:1px solid var(--border); border-radius:12px; padding:.75rem; background:color-mix(in srgb,var(--surface) 92%,var(--primary) 8%); }
.workshop-shipping-toggle { display:flex; align-items:flex-start; gap:.55rem; cursor:pointer; color:var(--text); font-size:.82rem; }
.workshop-shipping-toggle input { margin-top:.18rem; }
.workshop-address-fields { border:0; padding:.7rem 0 0; margin:0; border-top:1px dashed var(--border); }
.creator-order-address { display:grid; gap:.45rem; border:1px solid var(--border); border-radius:12px; padding:.85rem; background:color-mix(in srgb,var(--surface) 94%,var(--primary) 6%); }
.creator-order-address h4 { margin:0; font-size:.92rem; }
.creator-order-address address { display:grid; gap:.12rem; font-style:normal; color:var(--text-soft); line-height:1.45; }
.creator-order-address .creator-order-address-phone { margin-top:.25rem; }

/* Profil > Mes commandes : historique acheteur détaillé. */
.profile-purchase-history { margin-top: .4rem; }
.profile-purchase-order-card { align-items: flex-start; }
.profile-purchase-order-card .purchase-order-main { min-width: 0; flex: 1; }
.buyer-order-details { display: grid; gap: 1rem; margin-top: 1rem; border-top: 1px solid var(--border); padding-top: 1rem; }
.buyer-order-logistics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem; }
.buyer-order-payment { display: grid; align-content: start; gap: .55rem; border: 1px solid var(--border); border-radius: 12px; background: color-mix(in srgb,var(--surface) 94%,var(--secondary) 6%); padding: .85rem; }
.buyer-order-payment h4 { margin: 0; font-size: .92rem; }
.buyer-order-payment-list { display: grid; gap: .4rem; margin: 0; }
.buyer-order-payment-list > div { display: flex; justify-content: space-between; gap: 1rem; }
.buyer-order-payment-list dt, .buyer-order-payment-list dd { margin: 0; }
.buyer-order-payment-list dt { color: var(--text-soft); }
.buyer-order-payment-list dd { text-align: right; font-weight: 700; }
.buyer-order-product-link { display: inline-flex; margin-top: .25rem; }
@media (max-width: 720px) {
  .profile-purchase-order-card { display: grid; }
  .profile-purchase-order-card .purchase-order-meta { text-align: left; }
  .buyer-order-logistics { grid-template-columns: 1fr; }
}

/* ==========================================================
   Réclamations, rétractation et preuves privées — 033
   ========================================================== */
.order-claims-panel{margin-top:1rem;padding-top:1rem;border-top:1px solid var(--border)}
.order-claim-dialog{width:min(760px,calc(100vw - 2rem));max-height:calc(100vh - 2rem);overflow:auto}
.order-claim-dialog .dialog-content{padding:1rem}
.order-claim-dialog .dialog-actions{display:flex;justify-content:flex-end;gap:.75rem;flex-wrap:wrap}
.claim-reason-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.65rem}
.claim-reason-option{display:flex;align-items:flex-start;gap:.6rem;padding:.8rem;border:1px solid var(--border);border-radius:12px;background:var(--surface)}
.claim-reason-option.disabled{opacity:.55}
.claim-item-picker{display:grid;gap:.55rem}
.order-claim-card{display:grid;gap:.9rem;padding:1rem;border:1px solid var(--border);border-radius:16px;background:var(--surface)}
.order-claim-card>header{display:flex;justify-content:space-between;gap:1rem;align-items:flex-start}
.order-claim-card h4{margin:.4rem 0 0}
.claim-item-list{margin:0;padding-left:1.25rem}
.claim-evidence-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(96px,1fr));gap:.6rem}
.claim-evidence-grid a{display:block;aspect-ratio:1;border-radius:10px;overflow:hidden;border:1px solid var(--border)}
.claim-evidence-grid img{width:100%;height:100%;object-fit:cover;display:block}
.claim-message-list{display:grid;gap:.55rem;margin:.5rem 0}
.claim-message{padding:.7rem .8rem;border-radius:12px;background:var(--surface-soft,#f7f3ed);border:1px solid var(--border)}
.claim-message p{margin:.25rem 0}.claim-message small{opacity:.7}
.claim-creator-actions{display:flex;gap:.6rem;flex-wrap:wrap;align-items:center}
.shipment-evidence-panel{margin-top:1rem;padding:1rem;border:1px solid var(--border);border-radius:16px;background:var(--surface)}
.shipment-evidence-panel h4{margin-top:0}
.product-legal-type-field small{display:block;margin-top:.4rem}
@media(max-width:640px){.claim-reason-grid{grid-template-columns:1fr}.order-claim-card>header{flex-direction:column}.order-claim-dialog{width:calc(100vw - 1rem);max-height:calc(100vh - 1rem)}}
