/* ============================================================
   Découvrir (discover.html) et Créations (creations.html)
   Charte Hopla : fond terracotta (.landing-bg, css/styles.css) et cartes
   blanches arrondies, bord terracotta au survol. Voir CLAUDE.md.
   ============================================================ */

html { background: var(--bg); }
body { background: transparent; min-height: 100vh; overflow-x: hidden; }
.nav, .dc-hero, .dc-main, .landing-footer { position: relative; z-index: 1; }

:root {
  --dc-terra: #c8502c;
  --dc-card-border: rgba(18, 18, 28, 0.07);
  --dc-card-shadow: 0 1px 2px rgba(16, 24, 40, 0.04), 0 12px 28px -20px rgba(16, 24, 40, 0.3);
  --dc-card-shadow-hover: 0 20px 40px -12px rgba(50, 50, 93, 0.15);
}

/* ---------- Navigation ---------- */
.nav-actions { display: flex; gap: 8px; align-items: center; }
.nav-actions .btn-ghost { padding: 8px 14px; font-size: 13px; color: var(--ink-3); }
.nav-actions .btn-primary { padding: 8px 16px; font-size: 13px; }
@media (max-width: 640px) {
  .nav { padding: 14px 16px !important; }
  .nav-actions .btn-ghost { padding: 8px 10px; font-size: 12px; }
  .nav-actions .btn-primary { padding: 8px 12px; font-size: 12px; }
}

/* ---------- En-tête ---------- */
.dc-hero {
  max-width: 760px;
  margin: 0 auto;
  padding: 48px 16px 28px;
  text-align: center;
}
.dc-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid var(--dc-card-border);
  border-radius: 100px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-3);
  margin-bottom: 20px;
}
.dc-pill .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--success); }
.dc-hero h1 {
  font-size: clamp(34px, 6vw, 54px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin: 0 0 14px;
  color: var(--ink);
}
.dc-hero p {
  font-size: 17px;
  line-height: 1.5;
  color: var(--ink-3);
  max-width: 540px;
  margin: 0 auto;
}

/* Onglets Boutiques / Créations */
.dc-tabs {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  margin-top: 26px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--dc-card-border);
  border-radius: 100px;
  box-shadow: var(--dc-card-shadow);
}
.dc-tabs a {
  padding: 9px 22px;
  border-radius: 100px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-3);
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}
.dc-tabs a:hover { color: var(--ink); }
.dc-tabs a.is-active { background: var(--ink); color: #fff; }

/* Recherche */
.dc-search {
  position: relative;
  max-width: 520px;
  margin: 18px auto 0;
}
.dc-search svg {
  position: absolute;
  left: 16px;
  top: 50%;
  width: 18px;
  height: 18px;
  transform: translateY(-50%);
  stroke: var(--ink-soft);
  fill: none;
  stroke-width: 2;
  pointer-events: none;
}
.dc-search input {
  width: 100%;
  box-sizing: border-box;
  padding: 14px 18px 14px 46px;
  font-size: 16px;
  font-family: inherit;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--dc-card-border);
  border-radius: 100px;
  box-shadow: var(--dc-card-shadow);
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.dc-search input:focus { border-color: var(--dc-terra); box-shadow: 0 0 0 4px rgba(200, 80, 44, 0.12); }

@media (max-width: 640px) {
  .dc-hero { padding: 26px 16px 14px; }
  .dc-pill { margin-bottom: 14px; }
  .dc-hero h1 { font-size: 32px; margin-bottom: 10px; }
  .dc-hero p { font-size: 15px; }
  .dc-tabs { margin-top: 18px; }
  .dc-tabs a { padding: 8px 20px; }
  .dc-search { margin-top: 14px; }
  .dc-section-title { margin-top: 22px; }
}

/* ---------- Contenu ---------- */
.dc-main { max-width: 1200px; margin: 0 auto; padding: 8px 16px 72px; }
.dc-section-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin: 32px 0 16px;
}
.dc-section-title h2 { font-size: 22px; font-weight: 700; letter-spacing: -0.02em; margin: 0; }
.dc-section-title .count { font-size: 13px; font-weight: 500; color: var(--ink-soft); }

/* Carte commune */
.dc-card {
  display: block;
  background: #fff;
  border: 1px solid var(--dc-card-border);
  border-radius: 22px;
  box-shadow: var(--dc-card-shadow);
  overflow: hidden;
  color: inherit;
  text-decoration: none;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.dc-card:hover {
  transform: translateY(-4px);
  border-color: var(--dc-terra);
  box-shadow: var(--dc-card-shadow-hover);
}

/* Badges (nouveau, statut du vendeur) */
.dc-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 100px;
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.3;
  white-space: nowrap;
  background: #f4f4f5;
  color: var(--ink-3);
}
.dc-badge.is-new { background: #fdeee8; color: #a63c11; }
.dc-badge.is-private { background: #fef3c7; color: #92400e; }

/* ---------- Boutiques ---------- */
.dc-shops { display: grid; grid-template-columns: 1fr; gap: 18px; }
@media (min-width: 640px) { .dc-shops { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .dc-shops { grid-template-columns: repeat(3, 1fr); gap: 22px; } }

.dc-shop-wrap { position: relative; }
/* Rangées en minmax(0, 1fr) : sinon la rangée prend la hauteur naturelle de
   la photo et le format 16:10 n'est pas tenu. */
.dc-mosaic {
  display: grid;
  gap: 3px;
  aspect-ratio: 16 / 10;
  grid-template-rows: minmax(0, 1fr);
  overflow: hidden;
  background: #f4efe9;
}
.dc-mosaic.n1 { grid-template-columns: minmax(0, 1fr); }
.dc-mosaic.n2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.dc-mosaic.n3 { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); grid-template-rows: repeat(2, minmax(0, 1fr)); }
.dc-mosaic.n3 img:first-child { grid-row: 1 / span 2; }
.dc-mosaic img { width: 100%; height: 100%; min-width: 0; min-height: 0; object-fit: cover; display: block; background: #f4efe9; }

.dc-shop-body { position: relative; padding: 0 18px 18px; }
.dc-logo {
  width: 58px;
  height: 58px;
  margin-top: -29px;
  border-radius: 50%;
  border: 3px solid #fff;
  background: #fff center / cover no-repeat;
  box-shadow: 0 4px 12px -4px rgba(16, 24, 40, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  overflow: hidden;
}
.dc-logo.is-initial { background: linear-gradient(135deg, #e0722f 0%, #c94d1d 42%, #a63c11 100%); }
.dc-logo img { width: 100%; height: 100%; object-fit: cover; }
.dc-shop-name {
  margin: 10px 0 0;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dc-shop-tagline {
  margin-top: 3px;
  font-size: 13.5px;
  line-height: 1.45;
  color: var(--ink-soft);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.dc-shop-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
  font-size: 13px;
  color: var(--ink-3);
}
.dc-shop-meta .go { margin-left: auto; font-weight: 600; color: var(--ink); }
.dc-card:hover .dc-shop-meta .go { color: var(--dc-terra); }

/* Bouton admin « Masquer » (visible pour l'admin seulement) */
.dc-admin-hide {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 600;
  font-family: inherit;
  color: #991b1b;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid #fecaca;
  border-radius: 100px;
  cursor: pointer;
}

/* ---------- Créations (produits) ---------- */
.discover-products-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (min-width: 700px) { .discover-products-grid { grid-template-columns: repeat(3, 1fr); gap: 16px; } }
@media (min-width: 1000px) { .discover-products-grid { grid-template-columns: repeat(4, 1fr); gap: 20px; } }

.discover-product-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--dc-card-border);
  border-radius: 20px;
  box-shadow: var(--dc-card-shadow);
  overflow: hidden;
  color: inherit;
  text-decoration: none;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.discover-product-card:hover {
  transform: translateY(-4px);
  border-color: var(--dc-terra);
  box-shadow: var(--dc-card-shadow-hover);
}
.discover-product-img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
  background: #f4efe9;
}
.discover-product-info { padding: 11px 12px 13px; display: flex; flex-direction: column; gap: 3px; flex: 1; }
.discover-product-name {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--ink);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.discover-product-shop {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  font-size: 12.5px;
  color: var(--ink-soft);
}
.discover-product-shop .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.discover-product-shop .dc-badge { padding: 1px 7px; font-size: 10.5px; }
.discover-product-price { margin-top: auto; padding-top: 4px; font-size: 15px; font-weight: 700; color: var(--ink); }

.dc-more { text-align: center; margin-top: 28px; }
.dc-more button {
  padding: 12px 26px;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--dc-card-border);
  border-radius: 100px;
  box-shadow: var(--dc-card-shadow);
  cursor: pointer;
}
.dc-more button:hover { border-color: var(--dc-terra); color: var(--dc-terra); }

/* ---------- États ---------- */
.dc-empty {
  text-align: center;
  padding: 48px 24px;
  background: #fff;
  border: 1px solid var(--dc-card-border);
  border-radius: 22px;
  box-shadow: var(--dc-card-shadow);
}
.dc-empty h3 { font-size: 20px; margin: 0 0 8px; }
.dc-empty p { color: var(--ink-soft); font-size: 14px; margin: 0 0 18px; }

@keyframes dc-shimmer { 0% { background-position: -600px 0; } 100% { background-position: 600px 0; } }
.dc-sk {
  background: linear-gradient(90deg, #f3ede6 0%, #ebe3da 50%, #f3ede6 100%);
  background-size: 600px 100%;
  animation: dc-shimmer 1.4s infinite linear;
  border-radius: 12px;
}
.dc-sk-card { background: rgba(255, 255, 255, 0.8); border: 1px solid var(--dc-card-border); border-radius: 22px; padding: 12px; }
.dc-sk-img { aspect-ratio: 16 / 10; margin-bottom: 12px; }
.dc-sk-img.square { aspect-ratio: 1 / 1; }
.dc-sk-line { height: 12px; margin-bottom: 8px; }
.dc-sk-line.short { width: 55%; }

/* ---------- Informations (classement, statut) ---------- */
.dc-legal {
  max-width: 760px;
  margin: 44px auto 0;
  padding: 18px 20px;
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--ink-soft);
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--dc-card-border);
  border-radius: 16px;
}
.dc-legal strong { color: var(--ink-3); }

/* ---------- Appel à créer sa boutique ---------- */
.dc-cta {
  margin: 36px 0 0;
  padding: 40px 24px;
  text-align: center;
  color: #fff;
  border-radius: 22px;
  background: linear-gradient(135deg, #e0722f 0%, #c94d1d 42%, #a63c11 100%);
  box-shadow: 0 20px 40px -18px rgba(166, 60, 17, 0.55);
}
.dc-cta h2 { font-size: 28px; letter-spacing: -0.02em; margin: 0 0 8px; color: #fff; }
.dc-cta p { margin: 0 0 22px; font-size: 15px; color: rgba(255, 255, 255, 0.85); }
.dc-cta a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 22px;
  font-size: 15px;
  font-weight: 700;
  color: #a63c11;
  background: #fff;
  border-radius: 100px;
  text-decoration: none;
}

/* ---------- Pied de page ---------- */
.landing-footer {
  border-top: 1px solid rgba(18, 18, 28, 0.08);
  padding: 28px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  max-width: 1200px;
  margin: 0 auto;
  font-size: 13px;
  color: var(--ink-soft);
}
.landing-footer .links { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; font-size: 12px; }
.landing-footer .links a { color: inherit; text-decoration: none; }
