/* Les créations d'Alice v1.3 – feuille de style commune (vitrine + paramètres)
   Direction : reprend le logo – fond crème identique à l'image, rouge corail du lettrage,
   accents sauge / moutarde / ciel, cartes « cousues » (bordure pointillée = mailles).
   Thème clair unique, volontairement : le logo a un fond crème qui doit se fondre dans la page. */
:root{
  color-scheme: light;
  /* Couleurs */
  --bg:#FEF9ED;        /* crème – même valeur que le fond du logo */
  --surface:#FFFFFF;
  --ink:#4A3428;       /* brun chaud (ours) */
  --muted:#8A7364;
  --line:#EFE3CC;
  --coral:#EC4148;     /* lettrage du logo – grands textes et boutons */
  --coral-dk:#C42F37;  /* corail lisible pour petits textes */
  --coral-soft:#FDE3DF;
  --sage:#6FAE8E; --sage-dk:#3E7D5F; --sage-soft:#E3F1E9;
  --mustard:#F2B233; --mustard-dk:#A26B05; --mustard-soft:#FDF0D2;
  --sky:#5FA8DA;
  --stitch:#F2C9BE;    /* pointillé des cartes */
  /* Typo */
  --display:"Fredoka","Nunito",system-ui,sans-serif;
  --body:"Nunito",system-ui,-apple-system,"Segoe UI",sans-serif;
  --r:20px;
}

body{background:var(--bg);color:var(--ink);font-family:var(--body);font-size:16px;line-height:1.55;margin:0}
.wrap{max-width:1100px;margin:0 auto;padding-inline:20px;padding-block:20px 48px}
.wrap.narrow{max-width:760px;padding-bottom:120px}
:focus-visible{outline:3px solid var(--sky);outline-offset:2px}
.sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}

/* ---------- En-tête vitrine ---------- */
.hero{display:flex;flex-direction:column;align-items:center;text-align:center;gap:6px}
.hero .logo{width:100%;max-width:440px;height:auto;display:block}
.hero h1.txt{font-family:var(--display);font-weight:600;color:var(--coral);font-size:clamp(2.2rem,7vw,3.6rem);line-height:1.05;margin:24px 0 0;text-wrap:balance}
.hero .tag{margin:0;color:var(--muted);font-size:1.08rem;max-width:52ch;text-wrap:balance}
.yarn{display:block;width:min(520px,100%);height:34px;margin:14px auto 0;color:var(--coral)}

/* ---------- Message du jour (étiquette de laine) ---------- */
.notice{margin:22px auto 0;max-width:720px;background:var(--surface);border:2px dashed var(--coral);border-radius:var(--r);
  padding:14px 20px;display:flex;gap:12px;align-items:flex-start}
.notice svg{flex:none;width:26px;height:26px;color:var(--coral);margin-top:2px}
.notice .lbl{display:block;font-family:var(--display);font-weight:600;font-size:.82rem;letter-spacing:.06em;text-transform:uppercase;color:var(--sage-dk)}
.notice p{margin:2px 0 0;white-space:pre-line;font-size:1.05rem}
.notice > div{min-width:0}

/* ---------- Boutons ---------- */
.btn{font:700 .95rem var(--body);border-radius:999px;padding:.6rem 1.15rem;border:2px solid var(--ink);background:transparent;color:var(--ink);cursor:pointer;text-decoration:none;display:inline-block}
.btn:hover{background:var(--ink);color:var(--bg)}
.btn.primary{background:var(--coral);border-color:var(--coral);color:#fff}
.btn.primary:hover{background:var(--coral-dk);border-color:var(--coral-dk);color:#fff}
.btn.small{padding:.35rem .8rem;font-size:.86rem}
.btn.danger{border-color:var(--coral-dk);color:var(--coral-dk)}
.btn.danger:hover{background:var(--coral-dk);color:#fff}
.btn:disabled{opacity:.5;cursor:not-allowed}

/* ---------- Outils ---------- */
.section-h{font-family:var(--display);font-weight:600;font-size:1.6rem;margin:34px 0 0;display:flex;align-items:center;gap:10px}
.section-h::after{content:"";flex:1;border-top:2px dashed var(--stitch)}
.tools{display:flex;flex-wrap:wrap;gap:12px;align-items:center;margin:16px 0 20px}
.tools input[type=search]{flex:1 1 220px;min-width:0;font:inherit;padding:.65rem 1rem;border-radius:999px;border:2px solid var(--line);background:var(--surface);color:var(--ink)}
.tools input[type=search]:focus{border-color:var(--sky);outline:none}
.toggle{display:inline-flex;gap:.45rem;align-items:center;font-weight:700;font-size:.92rem;padding:.45rem .95rem;border-radius:999px;border:2px solid var(--line);background:var(--surface);color:var(--muted);cursor:pointer}
.toggle:has(input:checked){border-color:var(--sage);background:var(--sage-soft);color:var(--sage-dk)}
.toggle input{accent-color:var(--sage)}
.count{color:var(--muted);font-size:.9rem;font-variant-numeric:tabular-nums}

/* ---------- Cartes ---------- */
.grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(230px,1fr));gap:24px}
.card{background:var(--surface);border-radius:var(--r);padding:10px;position:relative;display:flex;flex-direction:column;min-width:0;box-shadow:0 2px 0 var(--line)}
.card::after{content:"";position:absolute;inset:5px;border:2px dashed var(--stitch);border-radius:calc(var(--r) - 5px);pointer-events:none}
.ph{aspect-ratio:1/1;max-width:100%;border-radius:14px;overflow:hidden;background:
  radial-gradient(circle at 30% 30%,var(--coral-soft) 0 18%,transparent 19%),
  radial-gradient(circle at 70% 65%,var(--sage-soft) 0 22%,transparent 23%),var(--bg);display:grid;place-items:center}
.ph img{width:100%;height:100%;object-fit:cover;display:block}
.ph span{font-family:var(--display);color:var(--muted);font-size:1rem;background:var(--surface);padding:.2rem .7rem;border-radius:999px}
.card .body{padding:12px 8px 8px;display:flex;flex-direction:column;gap:6px;flex:1}
.card h3{font-family:var(--display);font-weight:600;font-size:1.25rem;line-height:1.2;margin:0;text-wrap:balance}
.card p.desc{margin:0;color:var(--muted);font-size:.95rem;white-space:pre-line}
.meta{margin-top:auto;padding-top:10px;display:flex;justify-content:space-between;align-items:center;gap:8px;flex-wrap:wrap}
.price{font-family:var(--display);font-weight:600;font-size:1.3rem;color:var(--coral-dk);font-variant-numeric:tabular-nums}
.chip{font-size:.8rem;font-weight:700;padding:.22rem .65rem;border-radius:999px;white-space:nowrap}
.chip.ok{background:var(--sage-soft);color:var(--sage-dk)}
.chip.low{background:var(--mustard-soft);color:var(--mustard-dk)}
.chip.out{background:var(--line);color:var(--muted)}
.chip.ex{position:absolute;top:18px;left:18px;background:var(--surface);color:var(--coral-dk);border:2px solid var(--coral);z-index:1}
.card.soldout .ph{filter:grayscale(.65);opacity:.75}

.empty{text-align:center;padding:50px 20px;color:var(--muted);border:2px dashed var(--stitch);border-radius:var(--r);background:var(--surface)}
.empty h2{font-family:var(--display);font-weight:600;color:var(--ink);margin:0 0 .4rem}

/* ---------- Pied de page ---------- */
.contact{margin-top:44px;padding-top:22px;border-top:2px dashed var(--stitch);display:flex;flex-wrap:wrap;justify-content:space-between;align-items:center;gap:12px;color:var(--muted);font-size:.95rem}
.contact span:first-child{white-space:pre-line}
.foot-r{display:flex;gap:14px;align-items:center}
.ver{font-size:.78rem;color:var(--muted)}

/* ---------- Page paramètres ---------- */
header.top{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:16px;padding-bottom:18px;border-bottom:2px dashed var(--stitch)}
.brand{display:flex;align-items:center;gap:14px;min-width:0}
.brand img{width:64px;height:64px;object-fit:contain;border-radius:12px;background:var(--surface)}
.brand h1{font-family:var(--display);font-weight:600;font-size:clamp(1.8rem,5vw,2.4rem);line-height:1.05;margin:0;color:var(--coral)}
.brand p{margin:.2rem 0 0;color:var(--muted)}
.sect{background:var(--surface);border-radius:var(--r);padding:20px;display:flex;flex-direction:column;gap:14px;border:2px solid var(--line)}
.sect h2{font-family:var(--display);font-weight:600;font-size:1.35rem;margin:0}
.stack{display:flex;flex-direction:column;gap:20px;margin-top:24px}
.shead{display:flex;justify-content:space-between;align-items:center;gap:10px;flex-wrap:wrap}
.f{display:grid;grid-template-columns:1fr 1fr;gap:14px}
.fld{display:flex;flex-direction:column;gap:5px;min-width:0}
.fld.full{grid-column:1/-1}
.fld label,.lab{font-size:.78rem;font-weight:800;letter-spacing:.06em;text-transform:uppercase;color:var(--muted)}
.fld input,.fld textarea,.fld select{font:inherit;padding:.6rem .8rem;border-radius:12px;border:2px solid var(--line);background:var(--bg);color:var(--ink);min-width:0}
.fld input:focus,.fld textarea:focus,.fld select:focus{border-color:var(--sky);outline:none}
.fld textarea{min-height:90px;resize:vertical}
.check{display:flex;gap:.5rem;align-items:center;cursor:pointer;font-weight:700}
.check input{accent-color:var(--sage);width:18px;height:18px}
.photo-pick{display:flex;gap:14px;align-items:center;flex-wrap:wrap}
.photo-pick .ph{width:110px;flex:none}
.logo-pick .ph{width:180px;background:var(--bg)}
.logo-pick .ph img{object-fit:contain}
.hint{font-size:.88rem;color:var(--muted);margin:0}
.err{color:var(--coral-dk)}
.rows{display:flex;flex-direction:column;gap:10px}
.row{display:grid;grid-template-columns:56px 1fr auto;gap:12px;align-items:center;background:var(--bg);border-radius:14px;padding:8px 10px}
.row .ph{width:56px}
.row .ph span{font-size:.65rem;padding:.1rem .3rem}
.row .info{min-width:0}
.row .info b{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.row .info small{color:var(--muted);font-variant-numeric:tabular-nums}
.row .acts{display:flex;gap:6px;flex-wrap:wrap;justify-content:flex-end;align-items:center}
.stepper{display:flex;align-items:center;gap:4px}
.stepper button{width:32px;height:32px;border-radius:50%;border:2px solid var(--line);background:var(--surface);color:var(--ink);font:800 1rem var(--body);cursor:pointer}
.stepper button:hover{border-color:var(--sage)}
.stepper span{min-width:2ch;text-align:center;font-variant-numeric:tabular-nums;font-weight:800}
.confirm{grid-column:1/-1;display:flex;gap:8px;align-items:center;flex-wrap:wrap;font-size:.9rem;color:var(--coral-dk);font-weight:700}
.pubbar{position:fixed;left:0;right:0;bottom:0;background:var(--surface);border-top:2px dashed var(--stitch);z-index:10;
  padding-inline:20px;padding-top:12px;padding-bottom:calc(12px + env(safe-area-inset-bottom,0px))}
.pubbar .in{max-width:760px;margin:0 auto;display:flex;justify-content:space-between;align-items:center;gap:10px;flex-wrap:wrap}
.pending{font-size:.92rem;color:var(--muted)}
.pending b{color:var(--coral-dk)}
.toast{position:fixed;left:50%;transform:translateX(-50%);bottom:calc(84px + env(safe-area-inset-bottom,0px));background:var(--ink);color:var(--bg);padding:.7rem 1.15rem;border-radius:999px;z-index:30;font-weight:700;max-width:calc(100% - 32px)}

@media (max-width:520px){.f{grid-template-columns:1fr}.row{grid-template-columns:48px 1fr}.row .acts{grid-column:1/-1;justify-content:flex-start}}
@media (prefers-reduced-motion:no-preference){
  .card{transition:transform .2s}
  .card:hover{transform:translateY(-4px) rotate(-.4deg)}
}
