:root{
  --ink:#211f1b;
  --ink-soft:#665f58;
  --paper:#faf6f0;
  --card:#ffffff;
  --line:#ece3d6;
  --primary:#29abe2;
  --primary-dark:#1c84b3;
  --primary-soft:#e6f6fd;
  --primary-ink:#ffffff;
  --accent:#1f6f78;
  --accent-dark:#175a61;
  --accent-soft:#e4f1ef;
  --sun:#e3a72e;
  --radius:20px;
  --radius-sm:13px;
  --shadow-sm:0 1px 2px rgba(33,31,27,.05), 0 1px 1px rgba(33,31,27,.04);
  --shadow-md:0 10px 26px -12px rgba(33,31,27,.20), 0 2px 8px -2px rgba(33,31,27,.08);
  --shadow-lift:0 18px 38px -14px rgba(33,31,27,.28);
  --font-display:'Fraunces', Georgia, 'Times New Roman', serif;
  --font-body:'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}
*{box-sizing:border-box;}
html,body{margin:0;padding:0;}
body{
  font-family:var(--font-body);
  background:var(--paper);
  color:var(--ink);
  padding-bottom:108px;
  -webkit-font-smoothing:antialiased;
}
img{max-width:100%;}
button,input,select,textarea{font-family:inherit;}
button{ cursor:pointer; transition:transform .12s ease, background-color .15s ease, box-shadow .15s ease, opacity .15s ease; }
button:active{ transform:scale(.97); }

/* ---- view transition ---- */
.view{ animation:view-in .24s cubic-bezier(.22,.61,.36,1) both; }
@keyframes view-in{ from{ opacity:0; transform:translateY(8px); } to{ opacity:1; transform:translateY(0); } }

/* ---- layout shell ---- */
.topbar{
  position:sticky; top:0; z-index:30;
  display:flex; align-items:center; justify-content:space-between;
  padding:14px 18px;
  background:linear-gradient(120deg, var(--primary) 0%, var(--primary-dark) 65%, #125d84 100%);
  box-shadow:0 6px 20px -10px rgba(156,55,11,.55);
}
.brand{ display:flex; align-items:center; gap:10px; }
.brand img{ width:32px;height:32px;border-radius:24%; background:#fff; padding:2px; box-shadow:0 2px 8px rgba(0,0,0,.25); }
.brand-word{ font-family:var(--font-display); font-weight:600; font-size:18px; letter-spacing:-.01em; color:#fff; }
.brand-word .accent{ color:var(--sun); }

.btn-ghost{
  background:rgba(255,255,255,.16); border:1px solid rgba(255,255,255,.38); border-radius:999px;
  padding:9px 15px; font-size:13px; font-weight:700; color:#fff;
  backdrop-filter:blur(6px); -webkit-backdrop-filter:blur(6px);
}
.btn-ghost:active{ background:rgba(255,255,255,.3); }

.view{ max-width:720px; margin:0 auto; padding:18px 16px 22px; }
.hidden{ display:none !important; }

/* ---- locate bar (hero) ---- */
.locate-bar{
  position:relative; overflow:hidden;
  background:linear-gradient(145deg, var(--primary) 0%, #4cc3ef 45%, var(--accent-dark) 145%);
  border-radius:var(--radius);
  box-shadow:0 22px 40px -18px rgba(156,55,11,.5);
  padding:18px 18px 16px; margin-bottom:16px;
  color:#fff;
}
.locate-bar::before{
  content:""; position:absolute; top:-60px; right:-50px; width:190px; height:190px;
  background:radial-gradient(circle, rgba(255,255,255,.16) 0%, transparent 68%);
  pointer-events:none;
}
.locate-bar::after{
  content:""; position:absolute; bottom:-70px; left:-40px; width:170px; height:170px;
  background:radial-gradient(circle, rgba(227,167,46,.22) 0%, transparent 70%);
  pointer-events:none;
}
.locate-info{ display:flex; flex-direction:column; margin-bottom:14px; position:relative; }
.locate-label{ font-size:10.5px; text-transform:uppercase; letter-spacing:.08em; color:rgba(255,255,255,.72); font-weight:700; }
.locate-value{ font-family:var(--font-display); font-size:21px; font-weight:600; margin-top:2px; color:#fff; }
.locate-actions{ display:flex; flex-wrap:wrap; gap:8px; position:relative; }
.locate-hint{ margin:14px 0 0; font-size:11.5px; color:rgba(255,255,255,.72); line-height:1.55; padding-top:12px; border-top:1px solid rgba(255,255,255,.22); position:relative; }

.chip-btn{
  background:var(--paper); border:1px solid var(--line); border-radius:999px;
  padding:9px 14px; font-size:12.5px; font-weight:700; color:var(--ink-soft);
}
.chip-btn.active{ background:var(--primary); border-color:var(--primary); color:#fff; box-shadow:0 4px 12px -4px rgba(41,171,226,.5); }
.chip-btn--primary{ background:var(--accent); border-color:var(--accent); color:#fff; box-shadow:0 4px 12px -4px rgba(31,111,120,.5); }

.locate-actions .chip-btn{
  background:rgba(255,255,255,.14); border:1px solid rgba(255,255,255,.32); color:#fff;
  backdrop-filter:blur(6px); -webkit-backdrop-filter:blur(6px);
}
.locate-actions .chip-btn.active{ background:#fff; border-color:#fff; color:var(--primary-dark); box-shadow:0 6px 16px -8px rgba(0,0,0,.4); }
.locate-actions .chip-btn--primary{ background:rgba(255,255,255,.2); border-color:rgba(255,255,255,.46); color:#fff; box-shadow:none; }
.locate-actions .chip-btn--primary:active{ background:rgba(255,255,255,.32); }

/* ---- city info card ---- */
.city-info{
  background:var(--card); border-radius:var(--radius);
  box-shadow:var(--shadow-md);
  padding:20px; margin-bottom:16px;
}
.city-info.hidden{ display:none; }
.city-info .ci-head{ display:flex; align-items:baseline; justify-content:space-between; gap:10px; margin-bottom:10px; }
.city-info .ci-name{ font-family:var(--font-display); font-size:19px; font-weight:600; }
.city-info .ci-pop{ font-size:11.5px; color:var(--ink-soft); white-space:nowrap; font-weight:600; }
.city-info .ci-desc{ font-size:13px; color:var(--ink-soft); line-height:1.65; margin:0 0 14px; }
.city-info .ci-tags{ display:flex; flex-wrap:wrap; gap:7px; margin-bottom:16px; }
.city-info .ci-tag{ font-size:11px; font-weight:700; color:var(--accent); background:var(--accent-soft); padding:6px 12px; border-radius:999px; border:none; cursor:pointer; display:inline-flex; align-items:center; gap:5px; }
.city-info .ci-tag:active{ background:#d5e9e7; }
.city-info .ci-tag .ci-tag-ico{ font-size:10px; }
.city-info .ci-facts{ display:flex; flex-direction:column; gap:9px; padding-top:14px; border-top:1px solid var(--line); }
.city-info .ci-fact{ font-size:12px; color:var(--ink); display:flex; gap:9px; line-height:1.5; }
.city-info .ci-fact .ico{ color:var(--primary); flex:0 0 auto; }
.city-info .ci-source{ margin-top:12px; font-size:10px; color:#a39c92; }
.city-info .btn-photos{
  width:100%; margin-top:16px;
  background:var(--accent-soft); border:none; color:var(--accent-dark);
  font-weight:700; font-size:13.5px; padding:13px; border-radius:var(--radius-sm);
}
.city-info .btn-photos:active{ background:#d5e9e7; }

/* ---- toolbar / segmented ---- */
.toolbar{ display:flex; align-items:center; justify-content:space-between; gap:10px; margin-bottom:14px; }
.segmented{ flex:1; background:var(--card); box-shadow:var(--shadow-sm); border-radius:999px; display:flex; padding:4px; max-width:260px; }
.segmented .seg{ flex:1; text-align:center; padding:9px 0; font-size:13px; font-weight:700; color:var(--ink-soft); border-radius:999px; background:transparent; border:none; }
.segmented .seg.active{ background:var(--primary); color:#fff; box-shadow:0 4px 10px -4px rgba(41,171,226,.5); }
#btn-filters{ background:var(--card); box-shadow:var(--shadow-sm); border:none; }

/* ---- filters ---- */
.filters-panel{
  background:var(--card); border-radius:var(--radius);
  box-shadow:var(--shadow-md);
  padding:16px 18px; margin-bottom:16px;
}
.filters-row{ margin-bottom:14px; }
.filters-row:last-child{ margin-bottom:0; }
.filters-label{ display:block; font-size:11px; font-weight:700; color:var(--ink-soft); text-transform:uppercase; letter-spacing:.05em; margin-bottom:9px; }
.chips-row{ display:flex; flex-wrap:wrap; gap:7px; }
input[type="range"]{ width:100%; accent-color:var(--primary); }

/* ---- map mock ---- */
.map-mock{
  height:190px; border-radius:var(--radius); margin-bottom:16px;
  background:
    radial-gradient(circle at 28% 26%, #d6ebe4 0%, transparent 48%),
    radial-gradient(circle at 78% 64%, #e2ecd2 0%, transparent 42%), #eef1e9;
  position:relative; overflow:hidden;
  box-shadow:var(--shadow-md);
}
.map-mock .ring{ position:absolute; top:50%;left:50%; width:150px;height:150px; border:2px dashed var(--accent); border-radius:50%; transform:translate(-50%,-50%); opacity:.5; }
.map-mock .me{ position:absolute; top:50%;left:50%; width:14px;height:14px; background:var(--accent); border:2px solid #fff; border-radius:50%; transform:translate(-50%,-50%); box-shadow:0 0 0 6px rgba(31,111,120,.18); }
.map-pin{ position:absolute; width:18px;height:18px; background:var(--primary); border:2px solid #fff; border-radius:50% 50% 50% 0; transform:translate(-50%,-100%) rotate(-45deg); box-shadow:0 3px 6px rgba(0,0,0,.22); cursor:pointer; }
.map-tag{ position:absolute; bottom:12px; right:12px; background:rgba(255,255,255,.94); font-size:11px; font-weight:700; padding:5px 11px; border-radius:999px; color:var(--accent); box-shadow:var(--shadow-sm); }

/* ---- event list ---- */
.event-list{ display:flex; flex-direction:column; gap:11px; }
.event-card{
  display:flex; gap:14px; align-items:center;
  background:var(--card); border-radius:var(--radius-sm); padding:11px;
  text-align:left; width:100%; border:none;
  box-shadow:var(--shadow-sm);
  border-left:3px solid transparent;
}
.event-card:active{ box-shadow:var(--shadow-sm); background:#fdfbf8; }
.event-card[data-cat="Musique"]{ border-left-color:#e0524a; }
.event-card[data-cat="Marché"]{ border-left-color:#e3a72e; }
.event-card[data-cat="Festival"]{ border-left-color:#a34a9c; }
.event-card[data-cat="Sport"]{ border-left-color:#1f6f78; }
.event-card[data-cat="Soirée"]{ border-left-color:#3a4fb0; }
.event-card[data-cat="Expo"]{ border-left-color:#2f8f5b; }
.event-card .thumb{ width:68px;height:68px;border-radius:15px; flex:0 0 auto; overflow:hidden; background:var(--line); box-shadow:0 4px 10px -4px rgba(33,31,27,.22); }
.event-card .thumb svg{ display:block; width:100%; height:100%; }
.event-card .info{ flex:1; min-width:0; }
.event-card .cat{ font-size:10px; font-weight:800; color:var(--primary); text-transform:uppercase; letter-spacing:.05em; }
.event-card .title{ font-family:var(--font-display); font-size:15.5px; font-weight:600; margin:4px 0 4px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.event-card .meta{ font-size:12px; color:var(--ink-soft); }
.event-card .dist{ font-size:11px; font-weight:700; color:var(--accent-dark); background:var(--accent-soft); padding:6px 11px; border-radius:999px; flex:0 0 auto; }

.empty-state{ text-align:center; color:var(--ink-soft); font-size:13px; padding:28px 10px; }

/* ---- detail view ---- */
.back-btn{ background:none; border:none; font-weight:700; color:var(--ink); font-size:14px; padding:6px 0 16px; }
.detail-hero{ height:210px; border-radius:var(--radius); overflow:hidden; background:var(--line); margin-bottom:18px; box-shadow:var(--shadow-md); }
.detail-hero svg{ display:block; width:100%; height:100%; }
.pill{ display:inline-block; font-size:11px; font-weight:700; color:#fff; background:var(--accent); padding:6px 13px; border-radius:999px; margin-bottom:12px; }
.detail-body h1{ font-family:var(--font-display); font-weight:600; font-size:24px; margin:0 0 16px; line-height:1.22; letter-spacing:-.01em; }
.info-row{ display:flex; gap:12px; font-size:13.5px; margin-bottom:13px; }
.info-row .ico{ width:22px; text-align:center; color:var(--primary); }
.info-row .sub{ color:var(--ink-soft); font-size:12px; }
.detail-desc{ font-size:14px; color:var(--ink-soft); line-height:1.65; margin:16px 0 20px; }
.cta-row{ display:flex; gap:10px; }
.btn-primary{
  background:linear-gradient(155deg, var(--primary) 0%, var(--primary-dark) 100%);
  color:#fff; border:none; border-radius:var(--radius-sm); font-weight:700; font-size:14.5px; padding:14px 18px;
  box-shadow:0 10px 22px -10px rgba(41,171,226,.55);
}
.btn-primary.active{ background:linear-gradient(155deg, var(--accent) 0%, var(--accent-dark) 100%); box-shadow:0 10px 22px -10px rgba(31,111,120,.55); }
.btn-block{ width:100%; }
.btn-outline{ width:52px; background:var(--card); border:none; border-radius:var(--radius-sm); font-size:19px; box-shadow:var(--shadow-sm); }
.btn-outline.active{ background:#fde7e7; }
.cta-row .btn-primary{ flex:1; }

/* ---- publish form ---- */
.form-title{ font-family:var(--font-display); font-weight:600; font-size:22px; margin:6px 0 8px; letter-spacing:-.01em; }
.form-sub{ font-size:13px; color:var(--ink-soft); margin:0 0 20px; line-height:1.55; }
.publish-form{ display:flex; flex-direction:column; gap:15px; }
.field{ display:flex; flex-direction:column; gap:7px; font-size:11.5px; font-weight:700; color:var(--ink-soft); text-transform:uppercase; letter-spacing:.04em; }
.field input, .field select, .field textarea{
  border:1px solid var(--line); border-radius:var(--radius-sm); padding:12px 13px; font-size:14.5px;
  color:var(--ink); background:var(--card); text-transform:none; font-weight:400;
}
.field input:focus, .field select:focus, .field textarea:focus{ outline:2px solid var(--accent); outline-offset:1px; }
.field-row{ display:flex; gap:12px; }
.field-row .field{ flex:1; }

/* ---- confirm ---- */
.confirm-box{ text-align:center; padding:48px 10px; }
.confirm-icon{ width:74px;height:74px;border-radius:50%; background:linear-gradient(155deg,var(--accent),#4a9d94); color:#fff; font-size:32px; display:flex; align-items:center; justify-content:center; margin:0 auto 18px; box-shadow:0 12px 26px -10px rgba(31,111,120,.5); }
.confirm-box h1{ font-family:var(--font-display); font-weight:600; font-size:22px; margin:0 0 9px; }
.confirm-box p{ font-size:13.5px; color:var(--ink-soft); margin:0 0 24px; line-height:1.5; }

/* ---- bottom nav (floating) ---- */
.bottomnav{
  position:fixed; left:14px; right:14px; bottom:14px; z-index:40;
  max-width:392px; margin:0 auto;
  display:flex; background:rgba(255,255,255,.9);
  backdrop-filter:blur(14px) saturate(1.5);
  -webkit-backdrop-filter:blur(14px) saturate(1.5);
  border-radius:22px;
  box-shadow:0 16px 34px -12px rgba(33,31,27,.32), 0 2px 8px rgba(33,31,27,.06);
  padding:7px;
}
.nav-item{
  flex:1; display:flex; flex-direction:column; align-items:center; gap:2px;
  background:none; border:none; font-size:10.5px; font-weight:700; color:var(--ink-soft);
  padding:8px 0 7px; border-radius:16px;
}
.nav-item.active{
  color:#fff;
  background:linear-gradient(155deg, var(--primary) 0%, var(--primary-dark) 100%);
  box-shadow:0 8px 16px -6px rgba(41,171,226,.55);
}
.nav-item .dot{ font-size:18px; }

@media (min-width:760px){ .bottomnav{ max-width:460px; } }

/* ---- mes photos (souvenirs) ---- */
#btn-add-photo{ margin-bottom:18px; }
.photos-grid{ display:grid; grid-template-columns:repeat(3, 1fr); gap:9px; }
.photos-grid .photo-thumb{
  aspect-ratio:1; border-radius:var(--radius-sm); overflow:hidden; border:none; padding:0;
  background:var(--line); cursor:pointer; box-shadow:var(--shadow-sm);
}
.photos-grid .photo-thumb img{ width:100%; height:100%; object-fit:cover; display:block; }

.photo-lightbox{
  position:fixed; inset:0; z-index:70;
  background:rgba(18,16,14,.94);
  display:flex; flex-direction:column; align-items:center; justify-content:center; gap:20px;
  padding:20px;
}
.photo-lightbox.hidden{ display:none; }
.photo-lightbox img{ max-width:92vw; max-height:68vh; border-radius:16px; object-fit:contain; box-shadow:var(--shadow-lift); }
.lightbox-delete{
  background:#fff; color:var(--primary); border:none; border-radius:999px;
  padding:12px 24px; font-weight:700; font-size:13px; box-shadow:var(--shadow-md);
}

/* ---- landmark modal ---- */
.landmark-modal{
  position:fixed; inset:0; z-index:60;
  background:rgba(24,22,19,.6);
  backdrop-filter:blur(2px);
  display:flex; align-items:flex-end; justify-content:center;
}
.landmark-modal.hidden{ display:none; }
.landmark-modal-card{
  background:var(--card); width:100%; max-width:480px;
  border-radius:24px 24px 0 0; overflow:hidden;
  max-height:88vh; overflow-y:auto;
  box-shadow:var(--shadow-lift);
  animation:landmark-up .2s cubic-bezier(.22,.61,.36,1);
}
@keyframes landmark-up{ from{ transform:translateY(28px); opacity:0; } to{ transform:translateY(0); opacity:1; } }
.landmark-modal-img{ position:relative; height:210px; background:var(--line); }
.landmark-modal-img svg, .landmark-modal-img img{ display:block; width:100%; height:100%; object-fit:cover; }
.modal-close{
  position:absolute; top:14px; right:14px; z-index:2;
  width:34px; height:34px; border-radius:50%; border:none;
  background:rgba(24,22,19,.5); color:#fff; font-size:15px;
  display:flex; align-items:center; justify-content:center;
  backdrop-filter:blur(4px);
}
.landmark-modal-body{ padding:20px 22px 26px; }
.landmark-modal-body h2{ font-family:var(--font-display); font-weight:600; font-size:19px; margin:0 0 9px; }
.landmark-modal-body p{ font-size:13.5px; color:var(--ink-soft); line-height:1.65; margin:0; }

/* ---- responsive : desktop ---- */
@media (min-width:760px){
  .view{ padding-top:26px; }
  .event-list{ display:grid; grid-template-columns:1fr 1fr; }
  .cta-row{ max-width:360px; }
}
