/* Minibabyplace — styles complémentaires à Tailwind */
:root {
  --nuit: #17153B;
  --soleil: #FFC93C;
  --lagune: #0E7C7B;
  --coton: #FFFDF7;
}
html, body { overscroll-behavior-y: none; }
.no-scrollbar { scrollbar-width: none; }
.no-scrollbar::-webkit-scrollbar { display: none; }
:focus-visible { outline: 3px solid var(--soleil); outline-offset: 2px; border-radius: 8px; }

/* ---------- Fil vertical ---------- */
.feed { height: 100dvh; overflow-y: auto; scroll-snap-type: y mandatory; background: var(--nuit); }
.slide { position: relative; height: 100dvh; scroll-snap-align: start; scroll-snap-stop: always; overflow: hidden; background: var(--nuit); }
.slide-media { position: absolute; inset: 0; display: flex; overflow-x: auto; scroll-snap-type: x mandatory; }
.slide-media > * { flex: 0 0 100%; height: 100%; scroll-snap-align: center; object-fit: cover; background: #221f4d; }
.slide-media img, .slide-media video { width: 100%; height: 100%; object-fit: cover; }
.slide-shade { position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(to bottom, rgba(23,21,59,.55) 0%, rgba(23,21,59,0) 22%, rgba(23,21,59,0) 45%, rgba(23,21,59,.92) 88%); }
.dots { position: absolute; left: 0; right: 0; top: 118px; display: flex; gap: 5px; justify-content: center; pointer-events: none; }
.dots i { width: 6px; height: 6px; border-radius: 9px; background: rgba(255,255,255,.45); transition: width .2s; }
.dots i.on { width: 18px; background: #fff; }
.sound-btn { position: absolute; top: 132px; right: 12px; }

/* ---------- Étiquette de prix cousue ---------- */
.price-tag {
  position: relative; display: inline-flex; flex-direction: column; align-items: flex-start;
  background: var(--soleil); color: var(--nuit);
  padding: .45rem 1rem .5rem 1.6rem; border-radius: 6px 14px 14px 6px;
  transform: rotate(-3deg); transform-origin: left center;
  box-shadow: 0 6px 0 rgba(0,0,0,.18);
}
.price-tag::before { /* couture */
  content: ""; position: absolute; inset: 4px 5px 4px 18px; border: 2px dashed rgba(23,21,59,.35); border-radius: 4px 10px 10px 4px; pointer-events: none;
}
.price-tag::after { /* œillet */
  content: ""; position: absolute; left: 7px; top: 50%; width: 8px; height: 8px; margin-top: -4px; border-radius: 50%;
  background: var(--nuit); box-shadow: 0 0 0 2px rgba(255,255,255,.5);
}
.price-tag .amount { font-family: "Baloo 2", system-ui, sans-serif; font-weight: 800; font-size: 1.7rem; line-height: 1; white-space: nowrap; }
.price-tag .sub { font-size: .72rem; font-weight: 800; opacity: .75; }
.price-tag.auction { background: #fff; }

/* ---------- Boutons ---------- */
.btn-soleil { align-items: center; justify-content: center; gap: .5rem; background: var(--soleil); color: var(--nuit);
  font-weight: 800; font-size: 1.15rem; padding: .95rem 1.4rem; border-radius: 18px; box-shadow: 0 5px 0 #c8961a; transition: transform .08s, box-shadow .08s; }
.btn-soleil:active { transform: translateY(4px); box-shadow: 0 1px 0 #c8961a; }
.btn-brand { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; background: var(--brand, #B0185E); color: #fff; font-weight: 800; padding: .9rem 1.2rem; border-radius: 16px; }
.chip { flex: 0 0 auto; display: inline-flex; gap: .3rem; align-items: center; padding: .35rem .8rem; border-radius: 999px;
  font-size: .85rem; font-weight: 800; color: #fff; background: rgba(0,0,0,.32); backdrop-filter: blur(6px); white-space: nowrap; }
.chip-on { background: #fff; color: var(--nuit); }

.rail { position: absolute; right: 8px; bottom: 190px; display: flex; flex-direction: column; gap: 14px; align-items: center; z-index: 5; }
.rail button, .rail a { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: .75rem; font-weight: 800; color: #fff; text-shadow: 0 1px 3px rgba(0,0,0,.6); }
.rail .ico { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; font-size: 1.5rem; background: rgba(23,21,59,.45); backdrop-filter: blur(6px); }
.rail .liked .ico { background: #fff; }
.pop { animation: pop .35s ease; }
@keyframes pop { 40% { transform: scale(1.35); } }

.info { position: absolute; left: 0; right: 0; bottom: 0; padding: 0 76px calc(84px + env(safe-area-inset-bottom)) 16px; z-index: 4; }
.badge { display: inline-flex; align-items: center; gap: .25rem; font-size: .75rem; font-weight: 800; padding: .2rem .55rem; border-radius: 8px; background: rgba(255,255,255,.16); }

/* ---------- Feuille du bas ---------- */
.sheet { position: fixed; inset: 0; z-index: 60; }
.sheet-backdrop { position: absolute; inset: 0; background: rgba(23,21,59,.55); }
.sheet-panel { position: absolute; left: 0; right: 0; bottom: 0; max-height: 92dvh; overflow-y: auto; background: var(--coton);
  border-radius: 28px 28px 0 0; padding: 12px 18px calc(22px + env(safe-area-inset-bottom)); max-width: 30rem; margin: 0 auto;
  animation: sheetUp .22s ease-out; }
@keyframes sheetUp { from { transform: translateY(40px); opacity: .4; } }
.field { width: 100%; border: 2px solid #e7e5e4; background: #fff; border-radius: 16px; padding: .9rem 1rem; font-size: 1.1rem; font-weight: 700; outline: none; }
.field:focus { border-color: var(--nuit); }
.addr-opt { display: flex; flex-direction: column; align-items: center; gap: .35rem; padding: .9rem .4rem; border-radius: 18px; border: 2px solid #e7e5e4; background: #fff; font-weight: 800; font-size: .85rem; }
.addr-opt .ico { font-size: 1.8rem; line-height: 1; }
.addr-opt.on { border-color: var(--lagune); background: #e6f4f3; color: #0a5958; }
.code-box { width: 3rem; height: 3.6rem; text-align: center; font-size: 1.6rem; font-weight: 800; border: 2px solid #e7e5e4; border-radius: 14px; background: #fff; outline: none; }
.code-box:focus { border-color: var(--nuit); }
.rec { width: 92px; height: 92px; border-radius: 50%; background: var(--brand, #B0185E); color: #fff; font-size: 2.4rem; display: grid; place-items: center; margin: 0 auto; touch-action: none; user-select: none; -webkit-user-select: none; }
.rec.on { animation: pulse 1s infinite; background: #dc2626; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(220,38,38,.5); } 100% { box-shadow: 0 0 0 26px rgba(220,38,38,0); } }

/* ---------- Écrans classiques ---------- */
.card { background: #fff; border: 1px solid #ece9e3; border-radius: 22px; }
.tabbar a { padding: .55rem .9rem; border-radius: 999px; font-weight: 800; font-size: .9rem; white-space: nowrap; }
.tabbar a.on { background: var(--nuit); color: #fff; }
.opt-grid input:checked + label { border-color: var(--nuit); background: var(--nuit); color: #fff; }
.opt-grid label { display: flex; align-items: center; justify-content: center; gap: .35rem; text-align: center; padding: .7rem .5rem; border: 2px solid #e7e5e4; border-radius: 14px; background: #fff; font-weight: 800; font-size: .9rem; cursor: pointer; }
table.admin { width: 100%; font-size: .9rem; }
table.admin th { text-align: left; font-size: .75rem; color: #78716c; font-weight: 800; padding: .5rem; border-bottom: 1px solid #e7e5e4; }
table.admin td { padding: .6rem .5rem; border-bottom: 1px solid #f5f5f4; vertical-align: top; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .feed { scroll-behavior: auto; }
}

/* ---------- Espaces saisonniers ---------- */
.chip-season { background: rgba(255, 201, 60, .92); color: var(--nuit); }

/* ---------- Aide au premier lancement ---------- */
.onboard { position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; background: rgba(23,21,59,.72); transition: opacity .3s; }
.onboard.out { opacity: 0; }
.onboard-card { text-align: center; color: #fff; padding: 2rem; max-width: 22rem; }
.onboard-hand { font-size: 4.5rem; animation: swipeUp 1.6s ease-in-out infinite; }
@keyframes swipeUp { 0% { transform: translateY(60px); opacity: 0; } 25% { opacity: 1; } 70% { transform: translateY(-40px); opacity: 1; } 100% { transform: translateY(-60px); opacity: 0; } }

/* ---------- Étoiles ---------- */
.stars { display: flex; gap: .4rem; justify-content: center; flex-direction: row-reverse; }
.stars input { display: none; }
.stars label { font-size: 2.6rem; cursor: pointer; filter: grayscale(1); opacity: .45; transition: transform .1s; }
.stars input:checked ~ label, .stars label:hover, .stars label:hover ~ label { filter: none; opacity: 1; }
.stars label:active { transform: scale(1.2); }

/* ---------- Photos guidées ---------- */
.shot { position: relative; aspect-ratio: 3/4; border-radius: 16px; border: 2px dashed #d6d3d1; background: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: .2rem; font-weight: 800; font-size: .8rem; overflow: hidden; cursor: pointer; }
.shot .ico { font-size: 1.8rem; }
.shot img, .shot video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.shot.filled { border-style: solid; border-color: var(--lagune); }

/* ---------- Validation par glissement (master) ---------- */
.swipe-card { touch-action: pan-y; user-select: none; transition: transform .25s ease, opacity .25s; }
.swipe-card.dragging { transition: none; }

/* ---------- Tirer pour rafraîchir ---------- */
.feed { overscroll-behavior-y: contain; }
.ptr { position: fixed; top: calc(env(safe-area-inset-top) + 92px); left: 50%; z-index: 45; transform: translate(-50%, 0); opacity: 0;
  width: 44px; height: 44px; border-radius: 50%; background: #fff; color: var(--nuit); display: grid; place-items: center;
  box-shadow: 0 6px 18px rgba(0,0,0,.3); font-size: 1.5rem; font-weight: 800; pointer-events: none; transition: opacity .15s; }
.ptr.ready { background: var(--soleil); }
.ptr.spin .ptr-ico { animation: ptrspin .7s linear infinite; }
@keyframes ptrspin { to { transform: rotate(360deg); } }

/* ---------- Envoi des photos en direct ---------- */
.shot.filled::after { content: '✓'; position: absolute; top: 6px; right: 6px; width: 22px; height: 22px; border-radius: 999px; background: var(--lagune); color: #fff; font-size: .8rem; display: grid; place-items: center; }
.up-tile, .up-add { position: relative; aspect-ratio: 3/4; border-radius: 16px; overflow: hidden; }
.up-tile { background: #e7e5e4; box-shadow: 0 1px 0 rgba(0,0,0,.04); }
.up-tile > img, .up-tile > video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.up-add { border: 2px dashed #d6d3d1; background: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .25rem; text-align: center; cursor: pointer; color: #44403c; }
.up-add:active { transform: scale(.97); }
.up-kind, .up-tag { position: absolute; left: 6px; bottom: 6px; background: rgba(0,0,0,.6); color: #fff; font-size: .65rem; font-weight: 800; border-radius: 999px; padding: 1px 7px; }
.up-tag { background: rgba(255,255,255,.92); color: #17153B; max-width: calc(100% - 12px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.up-tile.is-first .up-tag { bottom: 22px; }
.up-tile:has(.up-kind) .up-tag { display: none; }
.up-cover { display: none; position: absolute; left: 0; right: 0; bottom: 0; background: var(--soleil, #FFC93C); color: #17153B; font-size: .65rem; font-weight: 900; text-align: center; padding: 2px 0; letter-spacing: .02em; }
.up-tile.is-first .up-cover { display: block; }
.up-tile.is-first .up-kind { bottom: 22px; }
.up-btn { position: absolute; top: 5px; width: 28px; height: 28px; border-radius: 999px; background: rgba(255,255,255,.92); display: grid; place-items: center; font-size: .8rem; font-weight: 900; box-shadow: 0 1px 4px rgba(0,0,0,.2); }
.up-del { right: 5px; color: #b91c1c; }
.up-star { right: 38px; }
.up-tile.is-first .up-star { display: none; }
.up-veil { position: absolute; inset: 0; background: rgba(23,21,59,.55); color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .35rem; padding: .5rem; text-align: center; transition: opacity .4s; }
.up-tile.is-done .up-veil { opacity: 0; }
.up-ring { --p: 0; width: 52px; height: 52px; border-radius: 999px; display: grid; place-items: center; background: conic-gradient(var(--soleil, #FFC93C) calc(var(--p) * 1%), rgba(255,255,255,.25) 0); }
.up-ring span { width: 42px; height: 42px; border-radius: 999px; background: rgba(23,21,59,.85); display: grid; place-items: center; font-size: .75rem; font-weight: 900; }
.up-status { font-size: .68rem; font-weight: 800; line-height: 1.15; }
.up-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 5px; background: rgba(255,255,255,.25); }
.up-bar i { display: block; height: 100%; width: 0; background: var(--soleil, #FFC93C); transition: width .2s; }
.up-tile.is-error .up-veil { background: rgba(127,29,29,.78); }
.up-tile.is-error .up-ring { display: none; }
.up-retry { background: #fff; color: #7f1d1d; font-weight: 900; font-size: .75rem; border-radius: 999px; padding: 3px 10px; }
.up-tile.is-busy .up-star { display: none; }

/* ---------- Fil : la photo entière, sur un fond flou de la même photo ---------- */
.slide-media > .m-frame { position: relative; margin: 0; overflow: hidden; background: #221f4d; cursor: zoom-in; }
.m-frame .m-bg { position: absolute; inset: -40px; width: calc(100% + 80px); height: calc(100% + 80px); object-fit: cover; filter: blur(28px) saturate(1.15) brightness(.78); transform: translateZ(0); }
.m-frame .m-fg { position: absolute; left: 0; top: calc(env(safe-area-inset-top) + 64px); width: 100%; height: calc(73% - 64px - env(safe-area-inset-top)); max-height: none; object-fit: contain; filter: drop-shadow(0 10px 24px rgba(0,0,0,.35)); }
.slide-media video.is-landscape { object-fit: contain; }
.slide-shade { background: linear-gradient(to bottom, rgba(23,21,59,.45) 0%, rgba(23,21,59,0) 14%, rgba(23,21,59,0) 58%, rgba(23,21,59,.55) 74%, rgba(23,21,59,.9) 100%); }
@media (min-aspect-ratio: 3/4) { .m-frame .m-fg { height: calc(82% - 64px - env(safe-area-inset-top)); } }

/* ---------- Visionneuse plein écran ---------- */
.viewer { position: fixed; inset: 0; z-index: 90; background: #0b0a1f; color: #fff; }
html.viewer-open, html.viewer-open body { overflow: hidden; }
.viewer-track { position: absolute; inset: 0; display: flex; overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior: contain; }
.viewer-track.locked { overflow-x: hidden; }
.viewer-page { flex: 0 0 100%; height: 100%; display: grid; place-items: center; overflow: hidden; scroll-snap-align: center; touch-action: pan-x; }
.viewer-page.zoomed { touch-action: none; cursor: grab; }
.viewer-page img { max-width: 100%; max-height: 100%; object-fit: contain; user-select: none; -webkit-user-drag: none; will-change: transform; transform-origin: center; }
.viewer-top { position: absolute; left: 0; right: 0; top: 0; display: flex; align-items: center; gap: .6rem; padding: calc(env(safe-area-inset-top) + 10px) 12px 24px; background: linear-gradient(rgba(0,0,0,.55), transparent); pointer-events: none; }
.viewer-count { font-weight: 900; font-size: .85rem; background: rgba(255,255,255,.16); border-radius: 999px; padding: 2px 10px; }
.viewer-count:empty { display: none; }
.viewer-title { flex: 1; min-width: 0; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.viewer-close { pointer-events: auto; width: 42px; height: 42px; border-radius: 999px; background: rgba(255,255,255,.18); font-size: 1.1rem; font-weight: 900; backdrop-filter: blur(6px); }
.viewer-hint { position: absolute; left: 50%; bottom: calc(env(safe-area-inset-bottom) + 28px); transform: translateX(-50%); background: rgba(255,255,255,.16); backdrop-filter: blur(6px); border-radius: 999px; padding: 6px 14px; font-size: .8rem; font-weight: 800; white-space: nowrap; transition: opacity .5s; pointer-events: none; }
.viewer-hint.gone { opacity: 0; }
