/* Pixi Comfort — thème sombre neutre, accent violet discret */

:root {
  --bg: #121316;
  --surface: #1a1c20;
  --surface-2: #22252a;
  --border: #2c2f35;
  --text: #e9eaee;
  --muted: #9b9fa9;
  --accent: #8b7cf6;
  --accent-soft: rgba(139, 124, 246, 0.14);
  --radius: 14px;
  --radius-sm: 8px;
  --max: 1180px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

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

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 20px; }

/* ---------- Barre d'annonce ---------- */
.announce {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  color: var(--muted);
  font-size: 13px;
  text-align: center;
  padding: 8px 16px;
}

/* ---------- En-tête ---------- */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(18, 19, 22, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.header__inner { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 24px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; letter-spacing: -0.02em; }
.logo__mark {
  width: 28px; height: 28px; border-radius: 8px;
  background: linear-gradient(135deg, var(--accent), #5b6cf0);
  display: grid; place-items: center;
}
.logo__mark span { width: 10px; height: 10px; background: var(--bg); border-radius: 2px; }
.nav { display: flex; gap: 28px; font-size: 14px; color: var(--muted); }
.nav a:hover, .nav a.is-active { color: var(--text); }
.cart-btn {
  position: relative; display: flex; align-items: center; gap: 8px;
  padding: 8px 14px; border: 1px solid var(--border); border-radius: 999px; font-size: 14px;
  transition: border-color .2s;
}
.cart-btn:hover { border-color: var(--accent); }
.cart-btn__count {
  min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px;
  background: var(--accent); color: #fff; font-size: 12px; font-weight: 600;
  display: grid; place-items: center;
}

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 24px; border-radius: 999px; font-weight: 600; font-size: 15px;
  transition: transform .15s, background .2s, border-color .2s;
}
.btn:active { transform: scale(0.98); }
.btn--primary { background: var(--accent); color: #fff; }
.btn--primary:hover { background: #7a6af0; }
.btn--ghost { border: 1px solid var(--border); }
.btn--ghost:hover { border-color: var(--muted); }
.btn--block { width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

/* ---------- Bannière ---------- */
.hero { padding: 88px 0 72px; position: relative; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: -40% -10% auto auto; width: 620px; height: 620px;
  background: radial-gradient(circle, var(--accent-soft), transparent 65%);
  pointer-events: none;
}
.hero__inner { display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; align-items: center; position: relative; }
.eyebrow { color: var(--accent); font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.hero h1 { font-size: clamp(36px, 5vw, 58px); line-height: 1.05; letter-spacing: -0.03em; margin: 14px 0 18px; }
.hero p { color: var(--muted); font-size: 18px; max-width: 480px; margin-bottom: 30px; }
.hero__actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero__visual {
  aspect-ratio: 4 / 3; border-radius: 20px; border: 1px solid var(--border);
  background:
    linear-gradient(160deg, rgba(139,124,246,.18), transparent 50%),
    repeating-linear-gradient(0deg, transparent 0 39px, rgba(255,255,255,.025) 39px 40px),
    repeating-linear-gradient(90deg, transparent 0 39px, rgba(255,255,255,.025) 39px 40px),
    var(--surface);
  display: grid; place-items: center; color: var(--muted); font-size: 14px; text-align: center; padding: 24px;
}

/* ---------- Sections ---------- */
.section { padding: 72px 0; }
.section--alt { background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section__head { display: flex; justify-content: space-between; align-items: end; gap: 16px; margin-bottom: 32px; }
.section__head h2, .section h2 { font-size: clamp(26px, 3vw, 34px); letter-spacing: -0.02em; line-height: 1.15; }
.section__head p { color: var(--muted); }

/* ---------- Grille produits ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 20px; }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column; transition: border-color .2s, transform .2s;
}
.card:hover { border-color: #3a3e46; transform: translateY(-2px); }
.card__media { aspect-ratio: 1; }
.card__body { padding: 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card__tag { font-size: 12px; color: var(--accent); font-weight: 600; }
.card__title { font-size: 15px; font-weight: 600; line-height: 1.35; }
.card__foot { margin-top: auto; padding-top: 10px; display: flex; justify-content: space-between; align-items: center; }
.price { font-weight: 700; font-size: 16px; }
.add-btn {
  width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--border);
  display: grid; place-items: center; transition: background .2s, border-color .2s;
}
.add-btn:hover { background: var(--accent); border-color: var(--accent); }

/* Visuel produit généré (en attendant les vraies photos) */
.thumb {
  width: 100%; height: 100%; display: grid; place-items: center; position: relative;
  background: radial-gradient(circle at 30% 20%, rgba(139,124,246,.16), transparent 60%), var(--surface-2);
  color: var(--muted);
}
.thumb svg { width: 42%; height: 42%; opacity: .85; }
.thumb__label {
  position: absolute; bottom: 10px; left: 10px; font-size: 11px; color: var(--muted);
  background: rgba(0,0,0,.35); padding: 3px 8px; border-radius: 999px;
}

/* ---------- Réassurance ---------- */
.perks { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.perk { padding: 24px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg); }
.perk__icon {
  width: 40px; height: 40px; border-radius: 10px; background: var(--accent-soft); color: var(--accent);
  display: grid; place-items: center; margin-bottom: 14px;
}
.perk h3 { font-size: 16px; margin-bottom: 4px; }
.perk p { color: var(--muted); font-size: 14px; }

/* ---------- FAQ ---------- */
.faq { max-width: 760px; }
.faq details { border-bottom: 1px solid var(--border); padding: 18px 0; }
.faq summary {
  cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 16px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--muted); font-size: 20px; line-height: 1; }
.faq details[open] summary::after { content: "–"; }
.faq details p { color: var(--muted); margin-top: 10px; }

/* ---------- Newsletter ---------- */
.newsletter { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: center; }
.newsletter p { color: var(--muted); margin-top: 8px; }
.field-row { display: flex; gap: 10px; }
.input {
  flex: 1; padding: 13px 16px; border-radius: 999px; border: 1px solid var(--border);
  background: var(--bg); color: var(--text); font: inherit;
}
.input:focus { outline: none; border-color: var(--accent); }
.form-note { font-size: 13px; color: var(--muted); margin-top: 10px; min-height: 20px; }

/* ---------- Page produit ---------- */
.product { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; padding: 48px 0 72px; }
.product__media { border-radius: 20px; overflow: hidden; border: 1px solid var(--border); aspect-ratio: 1; }
.product__info h1 { font-size: clamp(26px, 3vw, 36px); letter-spacing: -0.02em; line-height: 1.15; margin: 8px 0 12px; }
.product__price { font-size: 24px; font-weight: 700; margin-bottom: 20px; }
.product__desc { color: var(--muted); margin-bottom: 20px; }
.product__list { list-style: none; display: grid; gap: 8px; margin-bottom: 28px; }
.product__list li { display: flex; gap: 10px; }
.product__list li::before { content: "✓"; color: var(--accent); font-weight: 700; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--border); border-radius: 999px; }
.qty button { width: 40px; height: 44px; font-size: 18px; color: var(--muted); }
.qty button:hover { color: var(--text); }
.qty span { min-width: 28px; text-align: center; font-weight: 600; }
.buy-row { display: flex; gap: 12px; margin-bottom: 20px; }
.buy-row .btn { flex: 1; }
.note { font-size: 13px; color: var(--muted); padding: 12px 14px; border: 1px dashed var(--border); border-radius: var(--radius-sm); }
.breadcrumb { font-size: 13px; color: var(--muted); padding-top: 24px; }
.breadcrumb a:hover { color: var(--text); }

/* ---------- Panier (tiroir) ---------- */
.overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.55); opacity: 0; pointer-events: none;
  transition: opacity .25s; z-index: 90;
}
.overlay.is-open { opacity: 1; pointer-events: auto; }
.drawer {
  position: fixed; top: 0; right: 0; height: 100%; width: min(420px, 100%);
  background: var(--surface); border-left: 1px solid var(--border); z-index: 100;
  transform: translateX(100%); transition: transform .3s ease; display: flex; flex-direction: column;
}
.drawer.is-open { transform: translateX(0); box-shadow: var(--shadow); }
.drawer__head { display: flex; justify-content: space-between; align-items: center; padding: 20px; border-bottom: 1px solid var(--border); }
.drawer__head h2 { font-size: 18px; }
.drawer__close { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; color: var(--muted); }
.drawer__close:hover { background: var(--surface-2); color: var(--text); }
.drawer__items { flex: 1; overflow-y: auto; padding: 8px 20px; }
.drawer__empty { color: var(--muted); text-align: center; padding: 48px 0; }
.line { display: grid; grid-template-columns: 64px 1fr auto; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--border); align-items: center; }
.line__media { width: 64px; height: 64px; border-radius: 10px; overflow: hidden; }
.line__media .thumb__label { display: none; }
.line__title { font-size: 14px; font-weight: 600; line-height: 1.3; }
.line__meta { font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 10px; margin-top: 4px; }
.line__meta button { color: var(--muted); font-size: 16px; width: 22px; }
.line__meta button:hover { color: var(--text); }
.line__remove { font-size: 12px; color: var(--muted); text-decoration: underline; }
.drawer__foot { padding: 20px; border-top: 1px solid var(--border); display: grid; gap: 12px; }
.total { display: flex; justify-content: space-between; font-weight: 700; font-size: 17px; }
.drawer__foot small { color: var(--muted); font-size: 12px; }

/* ---------- Pages de texte (légal, livraison...) ---------- */
.page { padding: 48px 0 80px; max-width: 780px; }
.page h1 { font-size: clamp(28px, 3.5vw, 40px); letter-spacing: -0.02em; margin-bottom: 24px; }
.page h2 { font-size: 20px; margin: 32px 0 10px; }
.page h3 { font-size: 16px; margin: 22px 0 8px; }
.page p, .page li { color: #c9cbd2; }
.page ul, .page ol { padding-left: 22px; display: grid; gap: 6px; margin: 8px 0; }
.page a { color: var(--accent); text-decoration: underline; }
.page .todo { background: var(--accent-soft); color: var(--text); padding: 0 4px; border-radius: 4px; }
.page form { display: grid; gap: 12px; margin-top: 20px; }
.page textarea.input { border-radius: var(--radius-sm); min-height: 140px; resize: vertical; }
.page .input { border-radius: var(--radius-sm); }

/* ---------- Comptes clients ---------- */
.header__actions { display: flex; align-items: center; gap: 10px; }
.icon-btn {
  width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--border);
  display: grid; place-items: center; color: var(--muted); transition: border-color .2s, color .2s;
}
.icon-btn:hover, .icon-btn.is-active { border-color: var(--accent); color: var(--text); }

.auth { display: grid; place-items: center; padding: 56px 20px 88px; }
.auth__card {
  width: 100%; max-width: 440px; background: var(--surface); border: 1px solid var(--border);
  border-radius: 20px; padding: 32px;
}
.auth__card h1 { font-size: 26px; letter-spacing: -0.02em; margin-bottom: 4px; }
.auth__card form { display: grid; gap: 14px; margin-top: 24px; }
.auth__card label { display: grid; gap: 6px; font-size: 14px; font-weight: 500; }
.auth__card .input { border-radius: var(--radius-sm); }
.auth__card .check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; color: var(--muted); font-size: 13px; }
.auth__card .check input { margin-top: 3px; accent-color: var(--accent); }
.auth__card a { color: var(--accent); }
.auth__forgot { font-size: 13px; justify-self: end; margin-top: -6px; }
.auth__switch { margin-top: 20px; font-size: 14px; color: var(--muted); text-align: center; }
.muted { color: var(--muted); }
.form-msg { font-size: 14px; min-height: 20px; }
.form-msg[data-type="error"] { color: #f08a8a; }
.form-msg[data-type="success"] { color: #8fd9a8; }
.config-warning {
  margin-top: 16px; font-size: 13px; padding: 12px 14px; border-radius: var(--radius-sm);
  background: rgba(240, 180, 80, .1); border: 1px solid rgba(240, 180, 80, .35); color: #f0c98a;
}
.config-warning code { font-size: 12px; }

.account-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 8px; }
.account-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; }
.account-card h2 { font-size: 17px; margin: 0 0 12px; }
.account-card p { margin: 4px 0; }
.account-actions { display: flex; justify-content: space-between; align-items: center; margin-top: 28px; gap: 16px; flex-wrap: wrap; }
.link-danger { color: #f08a8a; font-size: 14px; text-decoration: underline; }
@media (max-width: 860px) { .account-grid { grid-template-columns: 1fr; } }

/* ---------- Pied de page ---------- */
.footer { border-top: 1px solid var(--border); padding: 48px 0 28px; color: var(--muted); font-size: 14px; }
.footer__grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 32px; margin-bottom: 32px; }
.footer h4 { color: var(--text); font-size: 14px; margin-bottom: 12px; }
.footer ul { list-style: none; display: grid; gap: 8px; }
.footer a:hover { color: var(--text); }
.footer__bottom { border-top: 1px solid var(--border); padding-top: 20px; font-size: 13px; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px);
  background: var(--surface-2); border: 1px solid var(--border); padding: 12px 18px; border-radius: 999px;
  font-size: 14px; opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s; z-index: 120;
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Mobile ---------- */
@media (max-width: 860px) {
  .nav { display: none; }
  .hero { padding: 56px 0 48px; }
  .hero__inner, .product, .newsletter { grid-template-columns: 1fr; }
  .perks { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .section { padding: 56px 0; }
  .section__head { flex-direction: column; align-items: start; }
}
@media (max-width: 480px) {
  .field-row { flex-direction: column; }
  .footer__grid { grid-template-columns: 1fr; }
  .grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .card__body { padding: 12px; }
}
