/* Product cards (catalogue, recherche, collections, blog). One component, resources/views/shop/card.blade.php,
   with variants standard / nouveaute / collection / recherche. Tokens shared with the home cards (home.css). */
:root {
  --card-surface: #f5f5f7;        /* standard card */
  --card-surface-new: #fff;       /* « Nouveau » card: light, framed, never black */
  --card-border: #e2e2e7;
  --card-radius: 22px;
  --card-media-radius: 14px;
  --card-media-ratio: 1 / 1;      /* fixed media box: rows keep the same height */
  --card-new-accent: #b64400;     /* brand orange on white: contrast 5.5:1 */
  --card-shadow-hover: 0 10px 28px #0000000f;
}

/* Titles never exceed two lines; the full name stays in the title attribute. */
.product-card h3,
.home-card h3,
.home-product-name {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
  overflow-wrap: break-word;
  word-break: normal;
  hyphens: auto;
}

/* Layout: media first, text, swatches, then the button and the price anchored at the bottom. */
.product-grid { align-items: stretch; }
.stock-signature .product-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  height: 100%;
  min-width: 0;
  padding: 18px 18px 16px;
  background: var(--card-surface);
  border: 1px solid transparent;
  border-radius: var(--card-radius);
  box-shadow: none;
}
.stock-signature .product-card .product-image {
  order: -1;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: auto;
  min-height: 0;
  aspect-ratio: var(--card-media-ratio);
  margin: 0;
  padding: 0;
  overflow: hidden;
  background: transparent;
  border-radius: var(--card-media-radius);
}
.stock-signature .product-card .product-image img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  object-position: center;
  padding: 8%;
  box-sizing: border-box;
  mix-blend-mode: multiply;
}
.stock-signature .product-card .product-intro { min-height: 0; }
.stock-signature .product-card .product-intro > a { color: inherit; text-decoration: none; }
.stock-signature .product-card h3 { font-size: clamp(15px, 1.1vw, 18px); line-height: 1.25; letter-spacing: -.01em; font-weight: 600; margin: 4px 0 0; min-height: 2.5em; overflow-wrap: anywhere; }
.stock-signature .product-card.card-compact h3 { font-size: 15px; }
.stock-signature .product-card .product-category { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; min-height: 1.3em; font-size: 12px; line-height: 1.3; color: var(--muted); font-weight: 500; text-transform: none; letter-spacing: .1px; }
.stock-signature .product-card .card-family { color: var(--muted); }
.stock-signature .product-card .card-colors { margin: 0; min-height: 0; }
.stock-signature .product-card .card-personalize { margin-top: auto; }
.stock-signature .product-card .product-bottom { margin-top: 0; padding-top: 0; gap: 10px; }

/* « Nouveau » marker: brand accent, no dark background. */
.card-new, .home-kicker-new { color: var(--card-new-accent); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; font-size: 11px; }

/* New products: white card with a light frame; the media box keeps the same ratio as the others. */
.stock-signature .product-card.is-new { background: var(--card-surface-new); border-color: var(--card-border); }
.stock-signature .product-card.is-new .product-image { background: transparent; }

/* Final, honest state when no picture can load: the neutral placeholder, no animation. */
.stock-signature .product-card .product-image.image-placeholder { background: #f4f4f6; }
.stock-signature .product-card .product-image.image-placeholder img { padding: 18%; mix-blend-mode: normal; }
.product-image.image-unavailable { display: grid; place-items: center; background: #f4f4f6; }
.product-image.image-unavailable::before { content: 'Visuel indisponible'; max-width: 150px; text-align: center; color: var(--muted); font-size: 12px; font-weight: 600; line-height: 1.4; }
.product-image.image-unavailable::after { content: none; animation: none; }

/* Short call to action with a « + » mark when the logo can be added. */
.card-personalize[href*="personnaliser=1"]::before { content: "+"; font-size: 1.25em; line-height: 1; font-weight: 500; margin-right: 6px; }

/* Light hover on pointer devices only. */
@media (hover: hover) and (pointer: fine) {
  .stock-signature .product-card { transition: box-shadow .3s ease, transform .3s ease, border-color .3s ease; }
  .stock-signature .product-card:hover { transform: translateY(-3px); box-shadow: var(--card-shadow-hover); }
  .stock-signature .product-card.is-new:hover { border-color: #d6d6dc; }
  .stock-signature .product-card:hover .product-image img { transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .product-card, .product-card:hover, .product-card .product-image img { transition: none !important; transform: none !important; }
}

/* Phones: two compact columns from 340 px, one column below. */
@media (max-width: 600px) {
  .stock-signature .catalogue-list .product-grid,
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .stock-signature .product-card { padding: 12px 12px 14px; border-radius: 18px; gap: 8px; }
  .stock-signature .product-card .product-image { aspect-ratio: 1 / 1; height: auto; }
  .stock-signature .product-card h3 { font-size: 15px; margin: 4px 0; }
  .stock-signature .product-card .product-category { font-size: 11px; line-height: 1.35; }
  .stock-signature .product-card .card-personalize { font-size: 13px; min-height: 40px; padding: 8px 10px; }
  .stock-signature .product-card .product-bottom { font-size: 12px; }
  .stock-signature .product-card .product-bottom .round-link { display: none; }
  .stock-signature .product-card .card-colors { gap: 6px; flex-wrap: wrap; }
  /* 28 px swatches (WCAG 2.2 target ≥ 24 px) so five fit in a half-width card. */
  .stock-signature .product-card .card-colors .color-swatch { width: 28px; height: 28px; min-width: 28px; min-height: 28px; padding: 0; flex: 0 0 28px; }
  .stock-signature .product-card .card-colors .color-swatch:nth-of-type(n+6) { display: none; }
}
@media (max-width: 339px) {
  .stock-signature .catalogue-list .product-grid,
  .product-grid { grid-template-columns: 1fr; }
}

/* Phones: the header scrolls away instead of covering a third of the screen. */
@media (max-width: 600px) {
  .site-header { position: relative; top: auto; }
}

/* En-tête compact sur téléphone : logo et icônes sur une ligne, recherche dessous. */
@media (max-width:700px){
  .site-header .header-main{display:grid;grid-template-columns:auto minmax(0,1fr);grid-template-areas:"brand actions" "search search";align-items:center;gap:10px 8px;padding-top:10px;padding-bottom:10px}
  .site-header .brand{grid-area:brand}
  .site-header .header-actions{grid-area:actions;justify-self:end;flex-wrap:nowrap;gap:4px;min-width:0}
  .site-header .header-actions a[href$="/compte"] span{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
  .site-header .search{grid-area:search;width:100%;margin:0}
}

/* Logo « stock. by MyGoodiz » : mot-symbole bleu MyGoodiz, vrai logo MyGoodiz aligné à droite dessous. */
.brand.brand-lockup{display:inline-flex;flex-direction:column;align-items:stretch;width:auto;flex-shrink:0;color:#232f5d;line-height:1;text-decoration:none}
.brand-lockup .brand-word{color:#232f5d}
.brand-lockup .brand-square{background:#e52526}
.brand-lockup .brand-by{display:flex;align-items:flex-end;justify-content:flex-end;gap:5px;margin:6px 0 0;font-size:11px;font-weight:600;letter-spacing:0;text-transform:none;color:#232f5d}
.brand-lockup .brand-by span{line-height:1;padding-bottom:1px}
.brand-lockup .brand-by img{display:block;height:16px;width:auto}
.site-header .header-main .brand.brand-lockup{width:auto}
footer .brand.brand-lockup,footer .brand.brand-lockup .brand-word{color:#232f5d}
@media (max-width:700px){
  .site-header .brand-lockup .brand-word{font-size:30px;letter-spacing:-2px}
  .site-header .brand-lockup .brand-square{width:6px;height:6px;margin-left:2px}
  .site-header .brand-lockup .brand-by{margin-top:3px;gap:4px;font-size:9px}
  .site-header .brand-lockup .brand-by img{height:11px}
}

/* Marques discrètes sur le visuel : nouveauté, promotion, éco-responsable, recyclé, fabriqué en France. */
.card-badges { position: absolute; top: 10px; left: 10px; z-index: 2; display: flex; flex-direction: column; gap: 6px; margin: 0; padding: 0; list-style: none; }
.card-badge { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: rgba(255,255,255,.94); border: 1px solid #e3e5ea; box-shadow: 0 1px 2px rgba(20,24,40,.06); color: var(--navy); }
.card-badge .icon { width: 16px; height: 16px; stroke-width: 1.8; }
.card-badge-eco { color: #2f7d4f; }
.card-badge-recycle { color: #1f7a73; }
.card-badge-france { color: #232f5d; }
.card-badge-europe { color: #2a4f9e; }
.card-badge-nouveau { color: var(--card-new-accent, #b64400); }
.card-badge-promo { color: var(--red, #e52526); }
@media (max-width: 600px) { .card-badges { top: 8px; left: 8px; gap: 5px; } .card-badge { width: 26px; height: 26px; } .card-badge .icon { width: 14px; height: 14px; } }
.card-badge-promo{color:#fff;background:#d92d20;border-color:#d92d20}.card-badge-promo svg{stroke:#fff}
/* Logo officiel MyGoodiz (marque unique depuis le 23/10/2026). */
.brand.brand-official{display:inline-flex;align-items:center;line-height:0;flex:none;margin-right:18px}
.brand.brand-official img{display:block;height:40px;width:auto;max-width:220px}
footer .brand.brand-official img{height:34px}
@media(max-width:1100px){.brand.brand-official img{height:32px}}@media(max-width:720px){.brand.brand-official{margin-right:10px}.brand.brand-official img{height:28px;max-width:140px}}
