/* Hoho Pyjama — charte "cocooning" : laine, lait d'avoine, cacao, rose poudré, sauge */
:root {
  --oat: #f4ede6;        /* fond lait d'avoine */
  --cream: #fbf7f2;      /* cartes */
  --cocoa: #4a3730;      /* texte */
  --mocha: #7a6258;      /* texte secondaire */
  --line: #e7dcd1;
  --clay: #b9775f;       /* accent principal, terre cuite douce */
  --clay-dark: #9b5f4a;
  --rose: #ecd3cc;
  --sage: #d6dfd2;
  --sky: #d7e1e6;
  --caramel: #ecd9bf;
  --linen: #e9e1d6;
  --berry: #e6c7c7;
  --radius: 22px;
  --display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --body: 'Nunito Sans', 'Segoe UI', system-ui, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: var(--body); color: var(--cocoa); background: var(--oat); line-height: 1.55; }
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--display); font-weight: 600; text-wrap: balance; }

.promo { background: var(--cocoa); color: var(--oat); text-align: center; font-size: 13.5px; padding: 8px 16px; letter-spacing: .02em; }

.site-header { position: sticky; top: 0; z-index: 10; background: rgba(251, 247, 242, .94); backdrop-filter: blur(6px); border-bottom: 1px solid var(--line); }
.bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px max(16px, 4vw) 8px; max-width: 1240px; margin: 0 auto; }
.logo { display: inline-flex; align-items: baseline; gap: 10px; text-decoration: none; color: var(--cocoa); }
.logo-mark { display: inline-flex; align-items: center; font-family: 'Nunito', var(--body); font-weight: 800; font-size: 34px; line-height: 1; letter-spacing: -.02em; }
.logo-btn { width: .68em; height: .68em; margin: .16em .03em 0; flex: none; }
.logo-word { font-family: 'Nunito', var(--body); font-weight: 700; font-size: 13px; letter-spacing: .38em; color: var(--mocha); }
.tools { display: flex; gap: 18px; align-items: center; font-weight: 700; }
.tools a { text-decoration: none; }
.tools .lang { font-weight: 600; color: var(--mocha); font-size: 14px; }
.cart-count { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: var(--clay); color: #fff; font-size: 12px; }
.cart-count[hidden] { display: none; }

.cats-nav { display: flex; gap: 8px; overflow-x: auto; padding: 4px max(16px, 4vw) 12px; max-width: 1240px; margin: 0 auto; scrollbar-width: none; }
.cats-nav::-webkit-scrollbar { display: none; }
.cats-nav a { flex: none; text-decoration: none; font-size: 14.5px; font-weight: 700; padding: 7px 15px; border-radius: 999px; background: var(--tone, var(--linen)); color: var(--cocoa); border: 2px solid transparent; }
.cats-nav a:hover, .cats-nav a.is-active { border-color: var(--cocoa); }

.tone-rose { --tone: var(--rose); }
.tone-sage { --tone: var(--sage); }
.tone-sky { --tone: var(--sky); }
.tone-caramel { --tone: var(--caramel); }
.tone-oat { --tone: var(--linen); }
.tone-berry { --tone: var(--berry); }

.btn { display: inline-block; background: var(--clay); color: #fff; border: 0; border-radius: 999px; padding: 12px 26px; font: 700 16px var(--body); text-decoration: none; cursor: pointer; transition: background .15s, transform .15s; }
.btn:hover { background: var(--clay-dark); transform: translateY(-1px); }
.btn:disabled { opacity: .6; cursor: wait; }
.btn-big { padding: 15px 32px; font-size: 17px; }
.btn:focus-visible, a:focus-visible, .size input:focus-visible + span { outline: 3px solid var(--clay); outline-offset: 3px; }

.hero { max-width: 1240px; margin: 0 auto; padding: clamp(36px, 7vw, 88px) max(16px, 4vw); display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 40px; align-items: center; }
.hero h1 { font-size: clamp(34px, 5.4vw, 62px); line-height: 1.05; margin: 0 0 18px; letter-spacing: -.015em; }
.hero p { font-size: 18px; color: var(--mocha); max-width: 46ch; margin: 0 0 28px; }
/* tricot dessiné en CSS : mailles en V */
.hero-knit { aspect-ratio: 1; border-radius: 40% 60% 55% 45% / 50% 45% 55% 50%; background-color: var(--rose);
  background-image:
    linear-gradient(135deg, transparent 46%, rgba(255,255,255,.55) 47% 53%, transparent 54%),
    linear-gradient(45deg, transparent 46%, rgba(255,255,255,.55) 47% 53%, transparent 54%);
  background-size: 28px 36px; background-position: 0 0, 14px 0; box-shadow: inset 0 0 0 14px rgba(255,255,255,.35); }

.block { max-width: 1240px; margin: 0 auto; padding: 24px max(16px, 4vw) 48px; }
.block h2 { font-size: clamp(26px, 3.4vw, 36px); margin: 0 0 22px; }

.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 16px; }
.tile { display: grid; gap: 6px; align-content: end; min-height: 170px; padding: 22px; border-radius: var(--radius); background: var(--tone); text-decoration: none; transition: transform .2s, box-shadow .2s; }
.tile:hover { transform: translateY(-3px); box-shadow: 0 14px 30px rgba(74, 55, 48, .12); }
.tile-name { font: 600 26px var(--display); }
.tile-desc { color: var(--mocha); font-size: 15px; max-width: 34ch; }
.tile-count { font-weight: 700; font-size: 14px; margin-top: 6px; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); gap: 22px; }
.card { background: var(--cream); border-radius: var(--radius); overflow: hidden; text-decoration: none; transition: transform .2s, box-shadow .2s; }
.card:hover { transform: translateY(-3px); box-shadow: 0 14px 30px rgba(74, 55, 48, .1); }
.card-img { aspect-ratio: 4 / 5; background: var(--linen); }
.card-img img { width: 100%; height: 100%; object-fit: cover; }
.card-img { position: relative; overflow: hidden; }
.card-img img.alt { position: absolute; inset: 0; object-fit: contain; background: #fff; opacity: 0; transition: opacity .35s ease; }
@media (hover: hover) {
  .card:hover .card-img.has-alt img.alt, .card:focus-visible .card-img.has-alt img.alt { opacity: 1; }
}
.card-img.show-alt img.alt { opacity: 1; }
.card-body { padding: 14px 16px 18px; }
.card h3 { font-size: 17px; margin: 0 0 6px; font-weight: 500; line-height: 1.3; }
.price { margin: 0; display: flex; gap: 8px; align-items: baseline; }
.price s { color: var(--mocha); font-size: .9em; }
.price strong { color: var(--clay-dark); font-size: 1.12em; }
.price-big { font-size: 26px; margin: 8px 0 16px; }

.cat-head { max-width: 1240px; margin: 24px auto 0; padding: clamp(28px, 5vw, 56px) max(16px, 4vw); }
.cat-head { background: var(--tone); border-radius: 0 0 var(--radius) var(--radius); }
.cat-head h1 { font-size: clamp(32px, 5vw, 54px); margin: 0 0 8px; }
.cat-intro { max-width: 1240px; margin: 22px auto 0; padding: 0 max(16px, 4vw); box-sizing: border-box; color: var(--mocha); line-height: 1.65; }
.cat-head p { margin: 0; color: var(--mocha); font-size: 18px; max-width: 52ch; }
.empty { color: var(--mocha); font-size: 18px; }

.trust { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 36px; padding: 28px 16px 56px; font-weight: 700; color: var(--mocha); }

.product { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 40px; max-width: 1140px; margin: 0 auto; padding: 36px max(16px, 4vw) 64px; }
.product-imgs { display: grid; gap: 12px; }
.product-imgs img { border-radius: var(--radius); background: var(--linen); }
.crumb { font-size: 14px; font-weight: 700; color: var(--clay-dark); text-decoration: none; }
.product-info h1 { font-size: clamp(26px, 3.6vw, 38px); margin: 6px 0 0; line-height: 1.15; }
fieldset { border: 0; padding: 0; margin: 24px 0; }
legend { font-weight: 700; margin-bottom: 10px; }
.sizes { display: flex; flex-wrap: wrap; gap: 10px; }
.size input { position: absolute; opacity: 0; }
.size span { display: inline-block; padding: 10px 16px; border-radius: 14px; border: 2px solid var(--line); background: var(--cream); cursor: pointer; font-weight: 700; }
.size input:checked + span { border-color: var(--cocoa); background: var(--rose); }
.mini-trust { list-style: none; padding: 0; margin: 24px 0 0; color: var(--mocha); display: grid; gap: 6px; }

.cart, .message { max-width: 760px; margin: 0 auto; padding: 48px 16px 72px; }
.message { text-align: center; }
.cart-lines { list-style: none; padding: 0; margin: 0 0 24px; }
.cart-lines li { display: grid; grid-template-columns: 64px 1fr auto auto; gap: 8px 14px; align-items: center; background: var(--cream); border-radius: 16px; padding: 12px; margin-bottom: 10px; }
.cart-lines img { width: 64px; height: 64px; object-fit: cover; border-radius: 12px; grid-row: span 2; }
.line-info { display: grid; }
.variant { color: var(--mocha); font-size: 14px; }
.qty { display: flex; align-items: center; gap: 8px; }
.qty button { width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--line); background: var(--oat); cursor: pointer; font-size: 16px; color: var(--cocoa); }
.line-price { font-weight: 700; }
.link { background: none; border: 0; color: var(--mocha); text-decoration: underline; cursor: pointer; justify-self: start; grid-column: 2; }
.cart-total { text-align: right; margin-bottom: 20px; }
.grand { font-size: 22px; }
.error { color: var(--clay-dark); font-weight: 700; }

.site-footer { display: grid; gap: 14px; justify-items: center; padding: 36px 16px; background: var(--cocoa); color: var(--oat); font-size: 14px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 22px; justify-content: center; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }

@media (max-width: 760px) {
  .hero { grid-template-columns: 1fr; }
  .hero-knit { max-width: 260px; justify-self: center; order: -1; }
  .tools .lang { display: none; }
  .logo-mark { font-size: 28px; }
  .logo-word { font-size: 11px; letter-spacing: .3em; }
  .cart-lines li { grid-template-columns: 56px 1fr auto; }
  .line-price { grid-column: 3; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* Choix modèle / taille */
.size.off span { opacity: .35; text-decoration: line-through; cursor: not-allowed; }
.add-form:has([data-axis="c"]) .size.off { display: none; }
.sel-price { font-size: 20px; margin: 0 0 14px; }
.price .from { font-size: .85em; color: var(--mocha); font-weight: 600; }
.add-form button[disabled] { opacity: .5; cursor: not-allowed; }

/* Pages légales */
.legal { max-width: 760px; margin: 0 auto; padding: clamp(28px, 5vw, 56px) max(16px, 4vw) 64px; }
.legal h1 { font-size: clamp(30px, 5vw, 42px); margin: 0 0 6px; }
.legal h2 { font-size: 22px; margin: 34px 0 10px; }
.legal h3 { font-size: 18px; margin: 24px 0 8px; }
.legal p, .legal li { color: var(--cocoa); }
.legal ul { padding-left: 1.2em; }
.legal li { margin: 4px 0; }
.legal a { color: var(--clay-dark); }
.legal-updated { color: var(--mocha); font-size: 14px; margin: 0 0 24px; }
.legal-box { background: var(--cream); border: 1px solid var(--line); border-radius: 16px; padding: 4px 20px; }

/* Choix du pays de livraison (panier) */
[hidden] { display: none !important; }
.cart-country { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; margin: 1rem 0; }
.cart-country select { font: inherit; padding: .45rem .7rem; border: 1px solid #d9cfc6; border-radius: 10px; background: #fbf7f2; color: #4a3730; }

/* Accueil : photo dans le rond tricoté + pastille */
.hero-art { position: relative; }
.hero-knit { position: relative; overflow: hidden; }
.hero-knit img { position: absolute; inset: 16px; width: calc(100% - 32px); height: calc(100% - 32px); object-fit: cover; border-radius: 40% 60% 55% 45% / 50% 45% 55% 50%; }
.hero-badge { position: absolute; left: -4%; bottom: 6%; display: grid; place-items: center; width: clamp(96px, 11vw, 128px); aspect-ratio: 1; padding: 14px; border-radius: 50%; background: var(--clay); color: #fff; font-family: var(--display); font-size: clamp(13px, 1.25vw, 15px); line-height: 1.2; text-align: center; text-decoration: none; transform: rotate(-8deg); box-shadow: 0 10px 24px rgba(74, 55, 48, .18), inset 0 0 0 5px rgba(255, 255, 255, .25); transition: transform .2s; }
.hero-badge:hover { transform: rotate(-4deg) scale(1.04); }

/* Carrousels */
.block-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.see-all { color: var(--clay-dark); font-weight: 700; text-decoration: none; }
.see-all:hover { text-decoration: underline; }
.carousel { position: relative; }
.carousel-track { display: grid; grid-auto-flow: column; grid-auto-columns: clamp(200px, 23%, 280px); gap: 22px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; padding: 4px 2px 14px; scrollbar-width: none; }
.carousel-track::-webkit-scrollbar { display: none; }
.carousel-track > .card { scroll-snap-align: start; }
.carousel-btn { position: absolute; top: 38%; z-index: 2; width: 46px; height: 46px; border: 0; border-radius: 50%; background: var(--cream); color: var(--cocoa); font-size: 28px; line-height: 1; cursor: pointer; box-shadow: 0 6px 18px rgba(74, 55, 48, .18); }
.carousel-btn.prev { left: -14px; }
.carousel-btn.next { right: -14px; }
.carousel-btn:disabled { opacity: 0; pointer-events: none; }
@media (max-width: 720px) {
  .carousel-track { grid-auto-columns: 68%; gap: 14px; }
  .carousel-btn { display: none; }
  .hero-art { order: -1; justify-self: center; width: min(300px, 82%); }
  .hero-art .hero-knit { max-width: none; width: 100%; justify-self: stretch; }
  .hero-badge { left: -6%; bottom: 2%; width: 92px; font-size: 12px; padding: 10px; }
}
/* Panier .com : renvoi vers le site suisse */
.cart-ch-note { font-size: .9rem; margin-top: 1rem; }
