:root {
  --color-bg: #ffffff;
  --color-bg-soft: #f7f6f3;
  --color-text: #101010;
  --color-text-muted: #666666;

  --color-indigo: #1f2940;
  --color-indigo-light: #e5e9f5;
  --color-leather: #8a5a3b;
  --color-mustard: #d9a441;

  --color-border: #e0e0e0;

  --radius-card: 4px;
  --shadow-soft: 0 12px 30px rgba(0, 0, 0, 0.06);

  --layout-max-width: 1120px;
}

/* RESET & BASE */

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

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

h1,
h2,
h3 {
  font-family: "Cormorant Garamond", "Times New Roman", serif;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin: 0;
}

/* LAYOUT */

main {
  max-width: var(--layout-max-width);
  margin: 0 auto;
  padding: 32px 24px 80px;
}

@media (min-width: 1024px) {
  main {
    padding-inline: 32px;
  }
}

/* HEADER */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(12px);
  background: rgba(255, 255, 255, 0.9);
}

.topbar {
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  border-bottom: 1px solid var(--color-border);
}

.topbar-links a {
  margin-left: 16px;
  text-decoration: none;
  color: var(--color-text-muted);
}

.topbar-links a.is-active {
  color: var(--color-indigo);
}

.main-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 32px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-mark {
  width: 20px;
  height: 20px;
  background: var(--color-indigo);
}

.brand-name {
  font-family: "Cormorant Garamond", serif;
  letter-spacing: 0.18em;
  font-size: 14px;
  text-transform: uppercase;
}

.main-nav a {
  margin: 0 12px;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  text-decoration: none;
  color: var(--color-text);
}

.main-nav a.nav-muted {
  color: var(--color-text-muted);
}

.main-nav a.is-active {
  color: var(--color-indigo);
}

.main-nav a:hover {
  color: var(--color-indigo);
  text-decoration: underline;
}

.header-actions .icon-button {
  border: none;
  background: transparent;
  margin-left: 12px;
  cursor: pointer;
  font-size: 14px;
}

.header-actions .icon-button.is-active {
  color: var(--color-indigo);
}

/* HERO HOME */

.hero-home {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 4fr);
  gap: 32px;
  min-height: calc(100vh - 120px);
  align-items: stretch;
  margin-top: 32px;
}

.hero-media {
  border-radius: 16px;
  overflow: hidden;
  background: var(--color-bg-soft);
  position: relative;
}

.hero-media-inner {
  width: 100%;
  height: 100%;
  min-height: 360px;
  background-image: radial-gradient(circle at 20% 0, #f5e9d2, transparent 55%), radial-gradient(circle at 80% 40%, #c9d4f7, transparent 60%), radial-gradient(circle at 30% 100%, #e3cec0, transparent 60%);
  background-color: #f5f2eb;
}

.hero-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 18px;
}

.hero-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--color-text-muted);
}

.hero-panel h1 {
  font-size: clamp(32px, 4vw, 42px);
  line-height: 1.05;
}

.hero-text {
  font-size: 15px;
  line-height: 1.6;
  color: var(--color-text-muted);
  max-width: 480px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 8px;
}

.btn-primary,
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 13px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color 140ms ease, border-color 140ms ease, color 140ms ease, box-shadow 140ms ease;
}

.btn-primary {
  background: var(--color-indigo);
  color: #ffffff;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
}

.btn-primary:hover {
  background: #141b2b;
}

.btn-secondary {
  background: transparent;
  color: var(--color-text);
  border-color: var(--color-border);
}

.btn-secondary:hover {
  border-color: var(--color-indigo);
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 16px;
  font-size: 12px;
  color: var(--color-text-muted);
}

.hero-meta-label {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 11px;
}

.hero-meta-value {
  display: block;
  margin-top: 3px;
  color: var(--color-text);
}

.scroll-indicator {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 24px;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.scroll-line {
  width: 40px;
  height: 1px;
  background: var(--color-text-muted);
}

/* HOME SECTIONS */

.home-section {
  margin-top: 64px;
  padding-top: 32px;
  border-top: 1px solid var(--color-border);
}

.home-section-alt {
  background: var(--color-bg-soft);
  margin-inline: -24px;
  padding-inline: 24px;
  padding-bottom: 40px;
}

.home-section-header {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.section-eyebrow {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--color-text-muted);
  margin-bottom: 8px;
}

.home-section-header h2 {
  font-size: 22px;
}

.section-intro {
  max-width: 420px;
  font-size: 14px;
  color: var(--color-text-muted);
}

.section-footer-link {
  margin-top: 24px;
  font-size: 13px;
}

.section-footer-link a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ENCYCLOPÉDIE LISTE */

.page-header {
  margin-top: 40px;
  margin-bottom: 24px;
}

.page-header h1 {
  font-size: 28px;
  margin-top: 8px;
}

.encyclopedia-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 22px;
}

.encyclopedia-card {
  border-radius: var(--radius-card);
  border: 1px solid var(--color-border);
  background: #ffffff;
  padding: 14px 14px 16px;
  cursor: pointer;
  transition: border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease, background-color 140ms ease;
}

.encyclopedia-card:hover {
  border-color: var(--color-indigo);
  box-shadow: var(--shadow-soft);
  transform: translateY(-2px);
}

.encyclopedia-thumb {
  width: 100%;
  height: 160px;
  border-radius: 3px;
  background: var(--color-indigo-light);
  margin-bottom: 10px;
  overflow: hidden;
}

.encyclopedia-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.encyclopedia-card h3 {
  font-size: 16px;
  margin-bottom: 4px;
}

.encyclopedia-subtitle {
  font-size: 13px;
  color: var(--color-text-muted);
  margin-bottom: 6px;
}

.encyclopedia-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.encyclopedia-tag {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid var(--color-border);
}

/* FICHE ENCYCLOPÉDIQUE */

.entry-section {
  margin-top: 40px;
}

.entry-hero {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  gap: 24px;
}

.entry-hero-image {
  border-radius: 10px;
  background: var(--color-indigo-light);
  overflow: hidden;
  min-height: 260px;
}

.entry-hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.entry-hero-text h1 {
  font-size: 26px;
  margin-bottom: 8px;
}

.entry-poem {
  font-size: 14px;
  line-height: 1.7;
  color: var(--color-text-muted);
  margin-top: 8px;
}

.entry-grid {
  margin-top: 32px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
}

.entry-block {
  border-radius: var(--radius-card);
  border: 1px solid var(--color-border);
  padding: 14px 16px 16px;
  background: #ffffff;
}

.entry-block h3 {
  font-size: 14px;
  margin-bottom: 6px;
}

.entry-block p {
  font-size: 13px;
  color: var(--color-text-muted);
  line-height: 1.6;
}

.entry-block-image {
  margin-top: 10px;
  border-radius: 4px;
  overflow: hidden;
}

.entry-voice {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--color-border);
  font-size: 14px;
  line-height: 1.8;
}

.entry-market-link {
  margin-top: 32px;
}

.entry-market-link h2 {
  font-size: 18px;
  margin-bottom: 12px;
}

/* MARKETPLACE */

.filters-row {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  align-items: flex-end;
  margin-bottom: 20px;
}

.filters-group {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 12px;
}

.filters-group label {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.filters-group select {
  min-width: 120px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--color-border);
  background: #ffffff;
  font-size: 12px;
}

.filters-toggle {
  font-size: 12px;
}

.toggle-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.toggle-pill input {
  accent-color: var(--color-indigo);
}

/* PRODUCT CARDS */

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 22px;
}

.product-card {
  border-radius: var(--radius-card);
  border: 1px solid var(--color-border);
  padding: 20px 18px 16px;
  transition: transform 140ms ease, box-shadow 140ms ease, border-color 140ms ease;
  background: #fff;
}

.product-card a {
  text-decoration: none;
  color: inherit;
}

.product-image-wrapper {
  width: 100%;
  padding-top: 75%;
  position: relative;
  margin-bottom: 16px;
}

.product-image-wrapper img {
  position: absolute;
  inset: 0;
  margin: auto;
  max-width: 80%;
  max-height: 80%;
  object-fit: contain;
}

.product-infos {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
}

.product-meta {
  font-size: 12px;
  color: var(--color-text-muted);
}

.product-price {
  font-size: 14px;
  font-weight: 500;
}

.product-card:hover {
  transform: translateY(-4px);
  border-color: var(--color-indigo);
  box-shadow: var(--shadow-soft);
}

/* PRODUCT DETAIL */

.product-detail-section {
  margin-top: 40px;
}

.product-detail {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  gap: 24px;
  border-radius: 12px;
  padding: 20px;
  background: #ffffff;
  border: 1px solid var(--color-border);
}

.product-detail-media {
  border-radius: 8px;
  background: var(--color-bg-soft);
  min-height: 260px;
  overflow: hidden;
}

.product-detail-media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.product-detail-main h1 {
  font-size: 22px;
  margin-bottom: 8px;
}

.product-detail-meta {
  font-size: 13px;
  color: var(--color-text-muted);
  margin-bottom: 16px;
}

.product-detail-price {
  font-size: 18px;
  margin-bottom: 16px;
}

.product-detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* ACCOUNT */

.account-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  margin-top: 32px;
  margin-bottom: 40px;
}

.form-card {
  border-radius: 10px;
  border: 1px solid var(--color-border);
  padding: 18px 18px 20px;
  background: #ffffff;
}

.form-card h2 {
  font-size: 18px;
  margin-bottom: 12px;
}

.form-card form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.form-card label {
  font-size: 13px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.form-card input {
  border-radius: 999px;
  border: 1px solid var(--color-border);
  padding: 7px 12px;
  font-size: 13px;
}

.full-width {
  width: 100%;
}

.form-error {
  margin-top: 4px;
  font-size: 12px;
  color: #b3261e;
  min-height: 18px;
}

.link-button {
  border: none;
  background: none;
  padding: 0;
  margin-top: 12px;
  font-size: 13px;
  text-decoration: underline;
  cursor: pointer;
}

/* ACCOUNT OBJECTS */

.account-objects {
  margin-top: 16px;
}

/* ADMIN */

.admin-guard {
  margin-top: 16px;
  padding: 14px 16px;
  font-size: 13px;
  border-radius: 8px;
  background: #fff7e6;
  border: 1px solid #f0d18a;
}

.admin-dashboard {
  margin-top: 24px;
}

.admin-summary-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
}

.summary-card {
  border-radius: 8px;
  border: 1px solid var(--color-border);
  background: #ffffff;
  padding: 14px 16px;
}

.summary-label {
  font-size: 12px;
  color: var(--color-text-muted);
  margin-bottom: 6px;
}

.summary-value {
  font-size: 20px;
}

.admin-tables {
  margin-top: 28px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 20px;
}

.admin-table h2 {
  font-size: 16px;
  margin-bottom: 8px;
}

.admin-table table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.admin-table th,
.admin-table td {
  padding: 6px 8px;
  border-bottom: 1px solid var(--color-border);
  text-align: left;
}

/* FOOTER */

.site-footer {
  max-width: var(--layout-max-width);
  margin: 0 auto;
  padding: 24px 24px 40px;
  font-size: 12px;
  color: var(--color-text-muted);
  border-top: 1px solid var(--color-border);
}

.footer-main {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 16px;
}

.footer-title {
  font-family: "Cormorant Garamond", serif;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 13px;
  margin-bottom: 6px;
}

.footer-text {
  max-width: 360px;
  font-size: 13px;
}

.footer-columns {
  display: flex;
  gap: 40px;
}

.footer-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  margin-bottom: 8px;
}

.footer-columns a {
  display: block;
  margin-bottom: 4px;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  border-top: 1px solid var(--color-border);
  padding-top: 12px;
}

.footer-bottom-links {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.footer-bottom a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* RESPONSIVE */

@media (max-width: 900px) {
  .hero-home {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-media-inner {
    min-height: 240px;
  }

  .home-section-header {
    flex-direction: column;
  }

  .admin-tables {
    grid-template-columns: minmax(0, 1fr);
  }

  .home-section-alt {
    margin-inline: -16px;
    padding-inline: 16px;
  }
}

@media (max-width: 720px) {
  .main-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .main-nav {
    font-size: 12px;
    flex-wrap: wrap;
  }

  .topbar {
    padding-inline: 16px;
  }

  main {
    padding: 24px 16px 64px;
  }

  .site-footer {
    padding-inline: 16px;
  }

  .footer-main {
    flex-direction: column;
  }
}
