/* ═══════════════════════════════════════════
   CADENAS VIRTUEL — prototype
   Palette : prune profond, rose poudré, ivoire, gris anthracite
   ═══════════════════════════════════════════ */

:root {
  --prune: #4a1d3f;
  --prune-deep: #2c1029;
  --prune-soft: #6b2f57;
  --rose: #e7b7c8;
  --rose-vif: #d98aa8;
  --rose-pale: #f6dee7;
  --ivoire: #fdf8f2;
  --creme: #f7ede3;
  --anthracite: #3a3540;
  --gris-doux: #8b8290;
  --or: #d4a95c;
  --ok: #3f8f6b;
  --warn: #b3574d;
  --radius: 20px;
  --shadow: 0 8px 28px rgba(74, 29, 63, 0.14);
  --font-ui: "Nunito Sans", system-ui, sans-serif;
  --font-display: "Cormorant Garamond", Georgia, serif;
}

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

html, body {
  height: 100%;
  background: #1d0c1a;
  font-family: var(--font-ui);
  color: var(--anthracite);
}

/* ── Cadre téléphone (sur grand écran) ── */
.phone {
  position: relative;
  max-width: 430px;
  margin: 0 auto;
  min-height: 100dvh;
  background: var(--ivoire);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
@media (min-width: 500px) {
  body { padding: 24px 0; }
  .phone {
    min-height: calc(100dvh - 48px);
    max-height: 900px;
    border-radius: 40px;
    border: 10px solid #17091a;
    box-shadow: 0 30px 80px rgba(0,0,0,0.55);
  }
}

.app {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding-bottom: 86px;
  scroll-behavior: smooth;
}

/* ── Écrans ── */
.screen { display: none; }
.screen.active { display: block; animation: screenIn 0.28s ease both; }
@keyframes screenIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ── Barre du haut ── */
.topbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 20px 10px;
}
.topbar h2 {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 600;
  color: var(--prune);
}
.back {
  border: none;
  background: var(--rose-pale);
  color: var(--prune);
  width: 38px; height: 38px;
  border-radius: 50%;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
  display: grid; place-items: center;
  padding-bottom: 3px;
}
.back:active { transform: scale(0.92); }

/* ── Boutons ── */
.btn {
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 16px;
  border: none;
  border-radius: 16px;
  padding: 14px 22px;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.2s ease, opacity 0.2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn-primary {
  background: linear-gradient(135deg, var(--prune) 0%, var(--prune-soft) 100%);
  color: var(--ivoire);
  box-shadow: 0 6px 20px rgba(74, 29, 63, 0.35);
}
.btn-secondary {
  background: var(--rose);
  color: var(--prune-deep);
}
.btn-ghost {
  background: transparent;
  color: var(--prune);
  border: 1.5px solid var(--rose);
}
.btn-big { width: 100%; padding: 17px 22px; font-size: 17px; }
.btn-small { padding: 9px 16px; font-size: 14px; }
.btn-ico { font-size: 19px; }

/* ═══════════ ACCUEIL ═══════════ */
.hero { position: relative; }
.hero-sky { position: relative; height: 240px; overflow: hidden; }
.hero-scene { width: 100%; height: 100%; display: block; }

.floating-hearts { position: absolute; inset: 0; pointer-events: none; }
.floating-hearts span {
  position: absolute;
  bottom: -20px;
  color: rgba(244, 194, 208, 0.65);
  font-size: 16px;
  animation: floatUp 9s linear infinite;
}
.floating-hearts span:nth-child(1) { left: 12%; animation-delay: 0s;  font-size: 13px; }
.floating-hearts span:nth-child(2) { left: 30%; animation-delay: 2.2s; font-size: 18px; }
.floating-hearts span:nth-child(3) { left: 55%; animation-delay: 4.5s; font-size: 12px; }
.floating-hearts span:nth-child(4) { left: 72%; animation-delay: 1.3s; font-size: 16px; }
.floating-hearts span:nth-child(5) { left: 88%; animation-delay: 5.8s; font-size: 14px; }
@keyframes floatUp {
  0%   { transform: translateY(0) rotate(0deg); opacity: 0; }
  12%  { opacity: 1; }
  85%  { opacity: 0.6; }
  100% { transform: translateY(-250px) rotate(18deg); opacity: 0; }
}

.hanging-hearts .hh { transform-origin: top center; animation: sway 4s ease-in-out infinite; }
.hanging-hearts .hh2 { animation-delay: 1.2s; }
.hanging-hearts .hh3 { animation-delay: 2.4s; }
@keyframes sway {
  0%, 100% { transform: rotate(-4deg); }
  50%      { transform: rotate(4deg); }
}

.lang-toggle {
  position: absolute;
  top: 14px; right: 14px;
  background: rgba(253, 248, 242, 0.18);
  border: 1.5px solid rgba(253, 248, 242, 0.45);
  color: var(--ivoire);
  font-family: var(--font-ui);
  font-weight: 800;
  font-size: 12px;
  letter-spacing: 0.08em;
  padding: 6px 12px;
  border-radius: 999px;
  cursor: pointer;
}
.lang-toggle:active { transform: scale(0.94); }

.hero-text { padding: 22px 24px 6px; text-align: center; }
.brand {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--rose-vif);
  margin-bottom: 10px;
}
.brand-lock { font-size: 14px; }
.hero-text h1 {
  font-family: var(--font-display);
  font-size: 34px;
  line-height: 1.12;
  font-weight: 600;
  color: var(--prune-deep);
}
.hero-text h1 em { color: var(--rose-vif); font-style: italic; }
.hero-sub {
  margin-top: 12px;
  font-size: 15px;
  line-height: 1.55;
  color: var(--gris-doux);
}

.home-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 20px 24px 8px;
}

.section-title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  color: var(--prune);
  padding: 18px 24px 10px;
}

.nearby-scroll {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 2px 24px 14px;
  scrollbar-width: none;
}
.nearby-scroll::-webkit-scrollbar { display: none; }
.nearby-card {
  flex: 0 0 150px;
  border-radius: var(--radius);
  overflow: hidden;
  background: white;
  box-shadow: var(--shadow);
  cursor: pointer;
  border: none;
  text-align: left;
  font-family: var(--font-ui);
  padding: 0;
}
.nearby-card:active { transform: scale(0.97); }
.nearby-visual {
  height: 84px;
  display: grid;
  place-items: center;
  font-size: 36px;
}
.nearby-info { padding: 10px 12px 12px; }
.nearby-info strong { display: block; font-size: 13.5px; color: var(--prune-deep); line-height: 1.25; }
.nearby-info small { color: var(--gris-doux); font-size: 12px; }

.home-pitch {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 10px 24px 30px;
}
.pitch-item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  background: white;
  border-radius: var(--radius);
  padding: 14px 16px;
  box-shadow: 0 3px 12px rgba(74,29,63,0.07);
  font-size: 14px;
  line-height: 1.45;
  color: var(--gris-doux);
}
.pitch-item span { font-size: 22px; }
.pitch-item strong { color: var(--prune-deep); }

/* ═══════════ LIEUX ═══════════ */
.gps-pill {
  margin: 4px 20px 12px;
  padding: 9px 14px;
  background: var(--rose-pale);
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--prune-soft);
  display: flex;
  align-items: center;
  gap: 8px;
}
.gps-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 0 0 rgba(63,143,107, 0.5);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(63,143,107,0.45); }
  70%  { box-shadow: 0 0 0 8px rgba(63,143,107,0); }
  100% { box-shadow: 0 0 0 0 rgba(63,143,107,0); }
}

.places-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 0 20px 30px;
}
.place-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: white;
  border: none;
  border-radius: var(--radius);
  padding: 12px;
  box-shadow: 0 3px 14px rgba(74,29,63,0.08);
  cursor: pointer;
  text-align: left;
  font-family: var(--font-ui);
  width: 100%;
}
.place-card:active { transform: scale(0.98); }
.place-visual {
  width: 64px; height: 64px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  font-size: 30px;
  flex-shrink: 0;
}
.place-info { flex: 1; min-width: 0; }
.place-info strong { display: block; font-size: 15.5px; color: var(--prune-deep); }
.place-info small { display: block; color: var(--gris-doux); font-size: 12.5px; margin-top: 2px; line-height: 1.35; }
.place-meta {
  text-align: right;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: flex-end;
}
.dist-badge {
  font-size: 12px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--creme);
  color: var(--gris-doux);
}
.dist-badge.near { background: #def0e7; color: var(--ok); }
.count-badge { font-size: 11.5px; color: var(--rose-vif); font-weight: 700; }

/* ═══════════ FICHE LIEU ═══════════ */
.place-hero {
  height: 170px;
  margin: 6px 20px 0;
  border-radius: var(--radius);
  display: grid;
  place-items: center;
  box-shadow: var(--shadow);
}
.place-hero-emoji { font-size: 64px; filter: drop-shadow(0 6px 12px rgba(0,0,0,0.25)); }
.place-body { padding: 18px 24px 30px; display: flex; flex-direction: column; gap: 14px; }
.place-desc { font-size: 15px; line-height: 1.55; color: var(--gris-doux); }
.place-stats { display: flex; gap: 12px; }
.stat {
  flex: 1;
  background: white;
  border-radius: var(--radius);
  padding: 14px;
  text-align: center;
  box-shadow: 0 3px 12px rgba(74,29,63,0.07);
}
.stat strong {
  display: block;
  font-family: var(--font-display);
  font-size: 28px;
  color: var(--prune);
}
.stat span { font-size: 12px; color: var(--gris-doux); line-height: 1.3; display: block; margin-top: 2px; }

.zone-badge {
  padding: 12px 16px;
  border-radius: 14px;
  font-size: 13.5px;
  font-weight: 700;
  text-align: center;
  line-height: 1.45;
}
.zone-ok { background: #def0e7; color: var(--ok); }
.zone-far { background: #f9e3df; color: var(--warn); font-weight: 600; }
.zone-far a { color: var(--warn); font-weight: 800; }

/* ═══════════ ÉTAPES / FORMULAIRES ═══════════ */
.steps {
  display: flex;
  gap: 6px;
  padding: 4px 24px 14px;
}
.step {
  flex: 1;
  height: 4px;
  border-radius: 4px;
  background: var(--rose-pale);
}
.step.on { background: var(--rose-vif); }

.form { padding: 0 24px 20px; display: flex; flex-direction: column; gap: 20px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field-label { font-size: 14px; font-weight: 800; color: var(--prune-deep); }
.field-label em { font-weight: 400; color: var(--gris-doux); font-style: normal; }
.field-hint { font-size: 12px; color: var(--gris-doux); }

input[type="text"], input[type="date"], textarea {
  font-family: var(--font-ui);
  font-size: 16px;
  padding: 13px 15px;
  border: 1.5px solid var(--rose-pale);
  border-radius: 14px;
  background: white;
  color: var(--anthracite);
  width: 100%;
  outline: none;
  transition: border-color 0.2s;
}
input:focus, textarea:focus { border-color: var(--rose-vif); }
textarea { resize: none; line-height: 1.5; }

.names-row { display: flex; align-items: center; gap: 10px; }
.names-amp {
  font-family: var(--font-display);
  font-size: 26px;
  font-style: italic;
  color: var(--rose-vif);
  flex-shrink: 0;
}

/* ── Modèles de cadenas ── */
.locks-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.lock-option {
  border: 2px solid transparent;
  background: white;
  border-radius: 16px;
  padding: 10px 4px 8px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  box-shadow: 0 3px 10px rgba(74,29,63,0.07);
  font-family: var(--font-ui);
}
.lock-option svg { width: 44px; height: 52px; }
.lock-option small { font-size: 11px; font-weight: 700; color: var(--gris-doux); }
.lock-option.selected { border-color: var(--rose-vif); background: var(--rose-pale); }
.lock-option.selected small { color: var(--prune); }

.bottom-cta { padding: 8px 24px 26px; }

/* ── Type de souvenir ── */
.type-row { display: flex; flex-wrap: wrap; gap: 8px; }
.type-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 2px solid transparent;
  background: white;
  border-radius: 999px;
  padding: 8px 14px;
  font-family: var(--font-ui);
  font-size: 13.5px;
  font-weight: 700;
  color: var(--gris-doux);
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(74,29,63,0.07);
}
.type-chip span { font-size: 16px; }
.type-chip.selected { border-color: var(--rose-vif); background: var(--rose-pale); color: var(--prune); }

/* ═══════════ PHOTO ═══════════ */
.photo-zone { padding: 4px 24px 10px; display: flex; flex-direction: column; gap: 12px; }
.photo-frame {
  aspect-ratio: 4 / 5;
  border-radius: var(--radius);
  background: white;
  border: 2px dashed var(--rose);
  overflow: hidden;
  display: grid;
  place-items: center;
  position: relative;
}
.photo-frame.has-photo { border-style: solid; border-color: transparent; box-shadow: var(--shadow); }
.photo-placeholder {
  text-align: center;
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  color: var(--gris-doux);
  font-size: 14px;
  line-height: 1.5;
}
.photo-ico { font-size: 40px; }
#photo-preview { width: 100%; height: 100%; object-fit: cover; }
.photo-actions { display: flex; gap: 10px; justify-content: center; }
.privacy-note {
  font-size: 12.5px;
  color: var(--gris-doux);
  text-align: center;
  line-height: 1.5;
  background: var(--creme);
  border-radius: 12px;
  padding: 10px 14px;
}

/* ═══════════ CONFIDENTIALITÉ ═══════════ */
.vis-cards { display: flex; flex-direction: column; gap: 10px; }
.vis-card {
  display: grid;
  grid-template-columns: 40px 1fr;
  grid-template-rows: auto auto;
  column-gap: 12px;
  align-items: center;
  text-align: left;
  background: white;
  border: 2px solid transparent;
  border-radius: 16px;
  padding: 14px 16px;
  cursor: pointer;
  font-family: var(--font-ui);
  box-shadow: 0 3px 10px rgba(74,29,63,0.06);
}
.vis-ico { grid-row: span 2; font-size: 26px; }
.vis-card strong { font-size: 15px; color: var(--prune-deep); }
.vis-card small { font-size: 12.5px; color: var(--gris-doux); line-height: 1.4; }
.vis-card.selected { border-color: var(--rose-vif); background: var(--rose-pale); }

.field-toggles {
  background: white;
  border-radius: 16px;
  padding: 6px 16px;
  box-shadow: 0 3px 10px rgba(74,29,63,0.06);
}
.toggles-title { font-size: 13.5px; font-weight: 800; color: var(--prune-deep); padding: 12px 0 6px; }
.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 0;
  border-top: 1px solid var(--rose-pale);
  font-size: 14.5px;
  cursor: pointer;
}
.toggle-row input, .settings-row input[type="checkbox"] { display: none; }
.switch {
  width: 46px; height: 27px;
  border-radius: 999px;
  background: #e4dce2;
  position: relative;
  transition: background 0.2s;
  flex-shrink: 0;
}
.switch::after {
  content: "";
  position: absolute;
  top: 3px; left: 3px;
  width: 21px; height: 21px;
  border-radius: 50%;
  background: white;
  box-shadow: 0 1px 4px rgba(0,0,0,0.25);
  transition: transform 0.2s;
}
.toggle-row input:checked + .switch,
.settings-row input:checked + .switch { background: var(--rose-vif); }
.toggle-row input:checked + .switch::after,
.settings-row input:checked + .switch::after { transform: translateX(19px); }

.consent-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  cursor: pointer;
  padding: 4px 2px;
}
.consent-row input { display: none; }
.checkbox {
  width: 24px; height: 24px;
  border-radius: 8px;
  border: 2px solid var(--rose-vif);
  flex-shrink: 0;
  display: grid;
  place-items: center;
  transition: background 0.15s;
  background: white;
}
.consent-row input:checked + .checkbox { background: var(--rose-vif); }
.consent-row input:checked + .checkbox::after {
  content: "✓";
  color: white;
  font-weight: 900;
  font-size: 14px;
}
.consent-text { font-size: 13.5px; line-height: 1.45; color: var(--anthracite); }

/* ═══════════ RITUEL ═══════════ */
.ritual {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: radial-gradient(ellipse at 50% 35%, #5e2547 0%, var(--prune-deep) 62%, #180a17 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 40px;
}
@media (min-width: 500px) {
  .ritual { position: absolute; border-radius: 30px; }
  .phone { position: relative; }
}
.ritual[hidden] { display: none; }

.ritual-stage { position: relative; width: 220px; height: 240px; display: grid; place-items: center; }
.ritual-lock svg { width: 170px; height: 200px; filter: drop-shadow(0 12px 30px rgba(0,0,0,0.45)); }

.ritual-lock .shackle {
  transition: transform 0.55s cubic-bezier(0.34, 1.56, 0.64, 1);
  transform: translateY(-26px) rotate(-8deg);
  transform-origin: 50% 100%;
}
.ritual-lock.closed .shackle { transform: none; }
.ritual-lock.closed { animation: lockClunk 0.35s ease 0.5s; }
@keyframes lockClunk {
  0% { transform: none; }
  30% { transform: translateY(5px) scale(0.985); }
  60% { transform: translateY(-2px); }
  100% { transform: none; }
}

.ritual-rings { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; }
.ring {
  position: absolute;
  width: 180px; height: 180px;
  border-radius: 50%;
  border: 2px solid var(--rose);
  opacity: 0;
}
.ring.go { animation: ringOut 1.1s ease-out forwards; }
@keyframes ringOut {
  0%   { transform: scale(0.7); opacity: 0.85; }
  100% { transform: scale(2.1); opacity: 0; }
}

.ritual-hearts { position: absolute; inset: -40px; pointer-events: none; }
.ritual-hearts span {
  position: absolute;
  bottom: 20%;
  font-size: 20px;
  opacity: 0;
}
.ritual-hearts span.go { animation: heartBurst 1.6s ease-out forwards; }
@keyframes heartBurst {
  0%   { transform: translate(0,0) scale(0.4); opacity: 0; }
  15%  { opacity: 1; }
  100% { transform: translate(var(--dx), var(--dy)) scale(1.1) rotate(var(--rot)); opacity: 0; }
}

.ritual-text {
  font-family: var(--font-display);
  font-size: 24px;
  font-style: italic;
  color: var(--rose-pale);
  text-align: center;
  padding: 0 30px;
  min-height: 34px;
  transition: opacity 0.4s;
}

.sound-toggle {
  position: absolute;
  top: 22px; right: 22px;
  background: rgba(255,255,255,0.12);
  border: none;
  border-radius: 50%;
  width: 42px; height: 42px;
  font-size: 18px;
  cursor: pointer;
}

/* ═══════════ CARTE SOUVENIR ═══════════ */
.souvenir-wrap {
  padding: 6px 24px 30px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
}
.memory-card {
  width: 100%;
  max-width: 320px;
  aspect-ratio: 9 / 16;
  border-radius: 24px;
  background: linear-gradient(170deg, var(--prune-deep) 0%, var(--prune) 45%, #7a3a63 100%);
  color: var(--ivoire);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 22px 20px 16px;
  box-shadow: 0 18px 50px rgba(44, 16, 41, 0.5);
  position: relative;
  overflow: hidden;
  animation: cardReveal 0.7s cubic-bezier(0.22, 1.2, 0.36, 1) both;
}
@keyframes cardReveal {
  from { opacity: 0; transform: translateY(26px) scale(0.94); }
  to   { opacity: 1; transform: none; }
}
.memory-card::before {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(231, 183, 200, 0.35);
  border-radius: 18px;
  pointer-events: none;
}
.mc-brand {
  order: -2;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--rose);
  margin-bottom: 12px;
}
.mc-photo {
  order: -1;
  width: 88%;
  aspect-ratio: 4 / 5;
  border-radius: 14px;
  background-size: cover;
  background-position: center;
  background-color: rgba(231,183,200,0.14);
  display: grid;
  place-items: center;
  font-size: 44px;
  margin-bottom: 4px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}
.mc-lock { margin-top: -26px; z-index: 2; }
.mc-lock svg { width: 46px; height: 54px; filter: drop-shadow(0 4px 10px rgba(0,0,0,0.4)); }
.mc-names {
  font-family: var(--font-display);
  font-size: 27px;
  font-weight: 600;
  margin-top: 4px;
  text-align: center;
  line-height: 1.1;
}
.mc-date { font-size: 13px; color: var(--rose); margin-top: 3px; font-weight: 600; }
.mc-place { font-size: 12px; color: rgba(253,248,242,0.85); margin-top: 5px; }
.mc-message {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 14px;
  text-align: center;
  color: rgba(253,248,242,0.9);
  margin-top: 7px;
  padding: 0 8px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.mc-slogan {
  margin-top: auto;
  font-size: 10.5px;
  font-style: italic;
  color: rgba(231,183,200,0.75);
  padding-top: 8px;
}

.share-row { display: flex; gap: 10px; width: 100%; max-width: 320px; }
.share-row .btn { flex: 1; font-size: 14.5px; padding: 13px 10px; }
.souvenir-wrap > .btn-ghost { width: 100%; max-width: 320px; }
.link-preview {
  font-size: 12.5px;
  color: var(--gris-doux);
  background: var(--creme);
  border-radius: 10px;
  padding: 8px 14px;
  word-break: break-all;
  text-align: center;
}

/* ═══════════ GALERIE ═══════════ */
.gallery-sub { padding: 0 24px 12px; font-size: 13.5px; color: var(--gris-doux); }
.gallery-grid {
  padding: 0 20px 30px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.gallery-card {
  border: none;
  background: white;
  border-radius: 18px;
  padding: 16px 12px 14px;
  box-shadow: 0 3px 12px rgba(74,29,63,0.08);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  font-family: var(--font-ui);
  animation: screenIn 0.4s ease both;
}
.gallery-card:active { transform: scale(0.96); }
.gallery-card svg { width: 42px; height: 50px; }
.gallery-card .g-names {
  font-family: var(--font-display);
  font-size: 16.5px;
  font-weight: 600;
  color: var(--prune-deep);
  text-align: center;
  line-height: 1.15;
}
.gallery-card .g-date { font-size: 11.5px; color: var(--gris-doux); font-weight: 600; }
.gallery-card.mine { outline: 2px solid var(--rose-vif); outline-offset: -2px; }
.gallery-card .g-mine-tag {
  font-size: 10px; font-weight: 800; color: var(--rose-vif);
  text-transform: uppercase; letter-spacing: 0.1em;
}

/* ═══════════ DÉTAIL CADENAS ═══════════ */
.lockdetail {
  margin: 6px 24px 14px;
  background: white;
  border-radius: var(--radius);
  padding: 26px 22px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
}
.lockdetail svg { width: 64px; height: 76px; }
.lockdetail .d-names { font-family: var(--font-display); font-size: 26px; font-weight: 600; color: var(--prune-deep); }
.lockdetail .d-date { font-size: 13.5px; color: var(--rose-vif); font-weight: 700; }
.lockdetail .d-place { font-size: 13px; color: var(--gris-doux); }
.lockdetail .d-message {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 17px;
  color: var(--anthracite);
  line-height: 1.5;
  margin-top: 8px;
}
.lockdetail .d-photo {
  width: 100%;
  border-radius: 14px;
  margin-top: 10px;
}
.report-btn { display: block; margin: 0 auto 30px; color: var(--gris-doux); border-color: #e4dce2; }

/* ═══════════ MES CADENAS ═══════════ */
.mylocks-list { padding: 4px 20px 30px; display: flex; flex-direction: column; gap: 12px; }
.mylock-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: white;
  border-radius: var(--radius);
  border: none;
  text-align: left;
  padding: 14px;
  box-shadow: 0 3px 12px rgba(74,29,63,0.08);
  cursor: pointer;
  font-family: var(--font-ui);
  width: 100%;
}
.mylock-card svg { width: 40px; height: 48px; flex-shrink: 0; }
.mylock-info { flex: 1; }
.mylock-info strong { display: block; font-family: var(--font-display); font-size: 18px; color: var(--prune-deep); }
.mylock-info small { color: var(--gris-doux); font-size: 12.5px; }
.vis-chip {
  font-size: 10.5px;
  font-weight: 800;
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--creme);
  color: var(--gris-doux);
  flex-shrink: 0;
}
.vis-chip.public { background: #def0e7; color: var(--ok); }
.vis-chip.link { background: var(--rose-pale); color: var(--rose-vif); }

/* ── Hauts-faits ── */
.badges-entry {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 4px 20px 14px;
  width: calc(100% - 40px);
  background: linear-gradient(120deg, var(--rose-pale), #fff 70%);
  border: 1.5px solid var(--rose);
  border-radius: var(--radius);
  padding: 14px 16px;
  cursor: pointer;
  font-family: var(--font-ui);
  font-size: 24px;
  text-align: left;
}
.badges-entry:active { transform: scale(0.98); }
.badges-entry div { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.badges-entry strong { font-size: 15px; color: var(--prune-deep); }
.badges-entry small { font-size: 12px; color: var(--rose-vif); font-weight: 700; }
.badges-entry > span:last-child { color: var(--rose-vif); font-size: 24px; }

.badges-sub { padding: 0 24px 14px; font-size: 13.5px; color: var(--gris-doux); line-height: 1.5; }
.badges-list { padding: 0 20px 30px; display: flex; flex-direction: column; gap: 12px; }
.badge-card {
  display: flex;
  gap: 14px;
  align-items: center;
  background: white;
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: 0 3px 12px rgba(74,29,63,0.08);
  opacity: 0.78;
}
.badge-card.done { opacity: 1; outline: 2px solid var(--or); outline-offset: -2px; }
.badge-ico { font-size: 30px; }
.badge-info { flex: 1; display: flex; flex-direction: column; gap: 5px; }
.badge-info strong { font-size: 15px; color: var(--prune-deep); }
.badge-info small { font-size: 12px; color: var(--gris-doux); line-height: 1.4; }
.badge-bar { height: 6px; border-radius: 6px; background: var(--rose-pale); overflow: hidden; }
.badge-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--rose-vif), var(--or));
  border-radius: 6px;
  transition: width 0.4s;
}
.badge-gift { color: var(--or) !important; font-weight: 700; }
.badge-state { font-size: 14px; font-weight: 800; color: var(--gris-doux); }
.badge-card.done .badge-state { font-size: 24px; }

/* ── Bannière de notification ── */
.notif-banner {
  position: absolute;
  top: 10px; left: 12px; right: 12px;
  z-index: 80;
  display: flex;
  gap: 12px;
  align-items: center;
  background: rgba(44, 16, 41, 0.96);
  color: var(--ivoire);
  border: none;
  border-radius: 18px;
  padding: 13px 16px;
  box-shadow: 0 12px 34px rgba(0,0,0,0.4);
  cursor: pointer;
  text-align: left;
  font-family: var(--font-ui);
  transform: translateY(-130%);
  transition: transform 0.35s cubic-bezier(0.22, 1.2, 0.36, 1);
}
.notif-banner.show { transform: none; }
.nb-ico { font-size: 22px; }
.nb-body { display: flex; flex-direction: column; gap: 2px; }
.nb-body strong {
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--rose);
}
.nb-body span { font-size: 13.5px; line-height: 1.35; }

.empty-state {
  padding: 60px 40px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  color: var(--gris-doux);
  font-size: 15px;
  line-height: 1.6;
}
.empty-ico { font-size: 52px; }

/* ═══════════ PARAMÈTRES ═══════════ */
.settings-list { padding: 4px 24px 30px; display: flex; flex-direction: column; gap: 10px; }
.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: white;
  border-radius: 16px;
  padding: 15px 16px;
  font-size: 14.5px;
  font-weight: 700;
  color: var(--prune-deep);
  box-shadow: 0 3px 10px rgba(74,29,63,0.06);
}
.chip {
  font-size: 12px;
  font-weight: 700;
  color: var(--gris-doux);
  background: var(--creme);
  padding: 5px 11px;
  border-radius: 999px;
  text-align: right;
}
.chip small { font-weight: 400; }
.settings-btn {
  border: none;
  cursor: pointer;
  font-family: var(--font-ui);
  width: 100%;
}
.settings-btn:active { transform: scale(0.98); }
.chip-action { background: var(--rose-pale); color: var(--prune); }
.settings-note {
  font-size: 12px;
  color: var(--gris-doux);
  text-align: center;
  line-height: 1.5;
  padding: 8px 10px 0;
}

/* ═══════════ MENTIONS LÉGALES ═══════════ */
.legal-body {
  padding: 4px 24px 34px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--anthracite);
}
.legal-body h3 {
  font-family: var(--font-display);
  font-size: 18px;
  color: var(--prune);
  margin: 18px 0 6px;
}
.legal-body p { margin: 0 0 8px; }
.legal-body ul { margin: 0 0 8px; padding-left: 20px; }
.legal-body li { margin-bottom: 6px; }
.legal-body .legal-note {
  margin-top: 16px;
  padding: 12px 14px;
  background: var(--creme);
  border-radius: 12px;
  font-size: 12.5px;
  color: var(--gris-doux);
}

/* ═══════════ NAVIGATION BASSE ═══════════ */
.bottomnav {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: var(--ivoire);
  border-top: 1px solid var(--rose-pale);
  display: flex;
  padding: 8px 6px calc(10px + env(safe-area-inset-bottom));
  z-index: 40;
}
.nav-btn {
  flex: 1;
  border: none;
  background: none;
  font-family: var(--font-ui);
  font-size: 10.5px;
  font-weight: 800;
  color: var(--gris-doux);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  cursor: pointer;
  padding: 4px 0;
}
.nav-btn span { font-size: 20px; filter: grayscale(1) opacity(0.55); transition: filter 0.2s; }
.nav-btn.active { color: var(--prune); }
.nav-btn.active span { filter: none; }
.bottomnav.hidden { display: none; }

/* ═══════════ TOAST ═══════════ */
.toast {
  position: absolute;
  left: 50%;
  bottom: 96px;
  transform: translateX(-50%) translateY(20px);
  background: var(--prune-deep);
  color: var(--ivoire);
  font-size: 13.5px;
  font-weight: 700;
  padding: 11px 20px;
  border-radius: 999px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s, transform 0.3s;
  z-index: 70;
  white-space: nowrap;
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ═══════════ ACCESSIBILITÉ ═══════════ */
:focus-visible { outline: 3px solid var(--rose-vif); outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
