/* ============================================================================
   CARNET ÉGYPTE — STYLE « RIAD LUXE »
   Sable, terracotta, or patiné. Titres en Playfair Display, texte en Jakarta.
   ============================================================================ */

:root {
    --sand: #F6EFE5;
    --paper: #FFFDF9;
    --ink: #2B1A12;
    --ink-soft: #5B463B;
    --muted: #8A7568;
    --line: #E6D9C8;
    --terracotta: #B4532F;
    --terracotta-deep: #5A2414;
    --gold: #B98A3E;
    --gold-soft: #F3E6CB;
    --sea: #0F5B6E;
    --sea-deep: #083B48;
    --green: #2F6B3A;
    --green-soft: #E4F0E2;
    --red: #A8281F;
    --red-soft: #FBEAE6;
    --accent: var(--sea);
    --accent-deep: var(--sea-deep);
    --radius: 22px;
    --shadow: 0 10px 30px -18px rgba(60, 30, 15, 0.45);
    --serif: "Playfair Display", Georgia, "Times New Roman", serif;
    --sans: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
}
body[data-city="caire"] {
    --accent: #9A5B1E;
    --accent-deep: #5A2414;
}
/* Marrakech : rouge terracotta des remparts */
body[data-city="marrakech"] {
    --accent: #B4532F;
    --accent-deep: #5A2414;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
    font-family: var(--sans);
    font-size: 15px;
    line-height: 1.5;
    color: var(--ink);
    background: #E9DFD0;
    -webkit-tap-highlight-color: transparent;
    overscroll-behavior: none;
}
[x-cloak] { display: none !important; }
h1, h2, h3, h4, p { margin: 0; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; touch-action: manipulation; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
ul { list-style: none; margin: 0; padding: 0; }

/* ---------------- Structure générale ---------------- */
.app {
    display: flex;
    flex-direction: column;
    height: 100vh;
    height: 100dvh;
    max-width: 520px;
    margin: 0 auto;
    background: var(--sand);
    position: relative;
    overflow: hidden;
    overflow: clip; /* empêche l'écran de glisser quand une fenêtre est cachée en bas */
    box-shadow: 0 0 60px rgba(60, 30, 15, 0.18);
}
.main {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 28px;
}
.page { padding: 18px 16px 0; display: grid; gap: 16px; }

/* ---------------- Barre du haut (onglets autres que l'accueil) ---------------- */
.topbar {
    position: relative;
    flex-shrink: 0;
    padding: max(12px, env(safe-area-inset-top)) 16px 12px;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.topbar h1 { font-family: var(--serif); font-size: 22px; font-weight: 700; letter-spacing: -0.01em; }

/* ---------------- Sélecteur de ville ---------------- */
.segmented {
    display: inline-flex;
    padding: 4px;
    border-radius: 999px;
    background: rgba(43, 26, 18, 0.07);
    gap: 2px;
}
.segmented button {
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
    color: var(--ink-soft);
    white-space: nowrap;
    transition: background 0.2s, color 0.2s;
}
.segmented button.on { background: var(--accent); color: #fff; box-shadow: 0 4px 10px -4px rgba(0, 0, 0, 0.4); }
.segmented.wide { display: flex; width: 100%; }
.segmented.wide button { flex: 1; padding: 10px 8px; }
.segmented.glass { background: rgba(255, 255, 255, 0.18); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border: 1px solid rgba(255, 255, 255, 0.3); }
.segmented.glass button { color: #fff; }
.segmented.glass button.on { background: #fff; color: var(--ink); }

/* ---------------- Accueil : grande photo ---------------- */
.hero {
    position: relative;
    min-height: 340px;
    padding: max(14px, env(safe-area-inset-top)) 16px 26px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    color: #fff;
    background-color: var(--accent-deep);
    background-size: cover;
    background-position: center;
    border-radius: 0 0 34px 34px;
    overflow: hidden;
}
.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(20, 10, 5, 0.5) 0%, rgba(20, 10, 5, 0.05) 38%, rgba(20, 10, 5, 0.78) 100%);
}
.hero > * { position: relative; }
.hero-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.back-link {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 8px 12px; border-radius: 999px;
    background: rgba(255, 255, 255, 0.18); border: 1px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
    font-size: 12px; font-weight: 700; color: #fff;
}
.eyebrow {
    font-size: 11px; font-weight: 800; letter-spacing: 0.18em; text-transform: uppercase;
    color: var(--gold);
}
.hero .eyebrow { color: #F0D9A8; }
.hero h1 { font-family: var(--serif); font-size: 46px; line-height: 1.02; font-weight: 700; letter-spacing: -0.02em; margin-top: 6px; }
.hero p { font-family: var(--serif); font-style: italic; font-size: 17px; opacity: 0.92; margin-top: 4px; }

/* ---------------- Cartes ---------------- */
.card {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 18px;
    box-shadow: var(--shadow);
}
.card.gold { border-color: #D9BF8B; box-shadow: var(--shadow), inset 0 0 0 4px var(--paper), inset 0 0 0 5px #EAD9B5; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.card h2 { font-family: var(--serif); font-size: 20px; font-weight: 700; letter-spacing: -0.01em; }
.card h3 { font-family: var(--serif); font-size: 17px; font-weight: 700; }
.section-title { display: flex; align-items: baseline; justify-content: space-between; padding: 6px 2px 0; }
.section-title h2 { font-family: var(--serif); font-size: 22px; font-weight: 700; }
.link { font-size: 13px; font-weight: 700; color: var(--terracotta); }
.muted { color: var(--muted); font-size: 13px; }
.small { font-size: 13px; color: var(--ink-soft); }

/* ---------------- Chiffres clés de l'accueil ---------------- */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: -40px; position: relative; z-index: 2; padding: 0 16px; }
.stat {
    background: var(--paper); border: 1px solid var(--line); border-radius: 18px;
    padding: 12px 10px; text-align: center; box-shadow: var(--shadow);
}
.stat b { display: block; font-family: var(--serif); font-size: 21px; line-height: 1.15; color: var(--ink); }
.stat span { display: block; font-size: 11px; font-weight: 700; color: var(--muted); margin-top: 2px; }
.stat.neg b { color: var(--red); }

/* ---------------- Boutons ---------------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    min-height: 48px; padding: 12px 18px; border-radius: 16px;
    font-size: 15px; font-weight: 700; text-align: center;
    transition: transform 0.12s, opacity 0.2s;
}
.btn:active { transform: scale(0.97); }
.btn.block { display: flex; width: 100%; }
.btn-primary { background: var(--terracotta); color: #fff; box-shadow: 0 10px 20px -12px var(--terracotta); }
.btn-accent { background: var(--accent); color: #fff; }
.btn-dark { background: var(--ink); color: #fff; }
.btn-ghost { background: var(--sand); color: var(--ink); border: 1px solid var(--line); }
.btn-danger { background: var(--red-soft); color: var(--red); }
.btn-sm { min-height: 38px; padding: 8px 14px; font-size: 13px; border-radius: 12px; }
.icon-btn {
    width: 40px; height: 40px; flex-shrink: 0; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--sand); border: 1px solid var(--line); color: var(--ink-soft); font-size: 15px;
}
.fab {
    position: absolute; right: 16px; bottom: calc(84px + env(safe-area-inset-bottom, 0px)); z-index: 20;
    height: 52px; padding: 0 20px; border-radius: 999px;
    display: inline-flex; align-items: center; gap: 8px;
    background: var(--terracotta); color: #fff; font-weight: 800; font-size: 14px;
    box-shadow: 0 14px 28px -10px rgba(90, 36, 20, 0.7);
}

/* ---------------- Pastilles de filtre ---------------- */
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 16px; margin: 0 -16px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
    flex-shrink: 0; display: inline-flex; align-items: center; gap: 7px;
    padding: 9px 15px; border-radius: 999px;
    background: var(--paper); border: 1px solid var(--line);
    font-size: 13px; font-weight: 700; color: var(--ink-soft);
}
.chip.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.chip.zone.on { background: var(--accent); border-color: var(--accent); }
.tag {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 4px 10px; border-radius: 999px;
    font-size: 11px; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase;
    background: var(--gold-soft); color: #6E4B12;
}
.tag.warn { background: var(--red-soft); color: var(--red); }
.tag.ok { background: var(--green-soft); color: var(--green); }
.tag.dark { background: rgba(20, 10, 5, 0.6); color: #fff; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }

/* ---------------- Recherche ---------------- */
.search { position: relative; }
.search i { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.search input { padding-left: 44px; border-radius: 999px; background: var(--paper); }

/* ---------------- Fiches lieux ---------------- */
.place-list { display: grid; gap: 16px; }
.place {
    display: block; width: 100%; text-align: left;
    background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
    overflow: hidden; box-shadow: var(--shadow);
}
.place:active { transform: scale(0.99); }
.photo {
    position: relative; aspect-ratio: 16 / 10; background: linear-gradient(135deg, var(--accent-deep), var(--accent));
    display: flex; align-items: center; justify-content: center; color: rgba(255, 255, 255, 0.55); font-size: 40px;
}
.photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.photo .tags { position: absolute; left: 12px; top: 12px; right: 12px; display: flex; justify-content: space-between; gap: 6px; }
.place-body { padding: 14px 16px 16px; }
.place-body h3 { font-family: var(--serif); font-size: 19px; line-height: 1.25; font-weight: 700; }
.place-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 8px; font-size: 13px; color: var(--ink-soft); }
.place-meta span { display: inline-flex; align-items: center; gap: 6px; }
.place-meta i { color: var(--gold); width: 14px; text-align: center; }

/* carrousel de l'accueil */
.rail { display: flex; gap: 12px; overflow-x: auto; padding: 4px 16px 10px; margin: 0 -16px; scroll-snap-type: x mandatory; scrollbar-width: none; }
.rail::-webkit-scrollbar { display: none; }
.rail-card {
    position: relative; flex: 0 0 68%; max-width: 280px; aspect-ratio: 4 / 5; scroll-snap-align: start;
    border-radius: 120px 120px 22px 22px; overflow: hidden; text-align: left; color: #fff;
    background: linear-gradient(135deg, var(--accent-deep), var(--accent)); box-shadow: var(--shadow);
}
.rail-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.rail-card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(20, 10, 5, 0) 40%, rgba(20, 10, 5, 0.85) 100%); }
.rail-card div { position: absolute; left: 16px; right: 16px; bottom: 16px; z-index: 1; }
.rail-card small { font-size: 11px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: #F0D9A8; }
.rail-card strong { display: block; font-family: var(--serif); font-size: 18px; line-height: 1.2; margin-top: 4px; }

/* ---------------- Lignes d'information ---------------- */
.rows { display: grid; }
.row { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-top: 1px solid var(--line); }
.row:first-child { border-top: 0; padding-top: 0; }
.row:last-child { padding-bottom: 0; }
.row > i { width: 34px; height: 34px; flex-shrink: 0; border-radius: 50%; background: var(--gold-soft); color: #7A5415; display: inline-flex; align-items: center; justify-content: center; font-size: 14px; }
.row .grow { flex: 1; min-width: 0; }
.row .label { font-size: 11px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.row .value { font-size: 15px; font-weight: 600; color: var(--ink); overflow-wrap: anywhere; }
.row .amount { font-weight: 800; white-space: nowrap; text-align: right; }
.row .amount small { display: block; font-weight: 600; color: var(--muted); font-size: 12px; }
button.row { width: 100%; text-align: left; }

/* ---------------- Encadrés ---------------- */
.alert { border-radius: 16px; padding: 14px; background: var(--red-soft); color: #6E1A14; font-size: 14px; border: 1px solid #F0C9C2; }
.alert strong { color: var(--red); }
.note { border-radius: 16px; padding: 14px; background: var(--sand); border: 1px solid var(--line); font-size: 14px; color: var(--ink-soft); }
.note.gold { background: var(--gold-soft); border-color: #E6D2A6; color: #5E4110; }
details summary { cursor: pointer; font-weight: 700; font-size: 14px; color: var(--terracotta); list-style: none; display: flex; align-items: center; gap: 8px; }
details summary::-webkit-details-marker { display: none; }
details[open] summary .fa-chevron-down { transform: rotate(180deg); }
.examples { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.examples div { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 9px 10px; font-size: 13px; font-weight: 700; }
.examples b { color: var(--green); }

/* ---------------- Convertisseur ---------------- */
.converter { display: grid; grid-template-columns: 1fr auto 1fr; gap: 10px; align-items: end; }
.converter .swap { height: 52px; display: flex; align-items: center; color: var(--gold); font-size: 18px; }

/* ---------------- Formulaires ---------------- */
.field { display: grid; gap: 6px; }
.field label, .field .lbl { font-size: 12px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
input, select, textarea {
    width: 100%; font: inherit; font-size: 16px; font-weight: 600; color: var(--ink);
    background: var(--paper); border: 1.5px solid var(--line); border-radius: 14px;
    padding: 13px 14px; min-height: 52px; outline: none; -webkit-appearance: none; appearance: none;
}
textarea { min-height: 88px; resize: vertical; line-height: 1.4; }
input:focus, select:focus, textarea:focus { border-color: var(--gold); box-shadow: 0 0 0 4px rgba(185, 138, 62, 0.18); }
select { background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 20px) 23px, calc(100% - 14px) 23px; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 36px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form { display: grid; gap: 14px; }
.maps-fill { display: flex; gap: 8px; }
.maps-fill input { flex: 1; min-width: 0; }
.maps-fill .btn { flex: none; padding: 12px 14px; }
.maps-fill .btn:disabled { opacity: 0.7; }
.photo-pick {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    height: 150px; border-radius: 16px; cursor: pointer;
    border: 1.5px dashed var(--line); background: var(--sand) center / cover no-repeat;
    color: var(--muted); font-weight: 700; font-size: 14px; text-align: center; padding: 12px;
}
.photo-pick .photo-change {
    align-self: flex-end; margin-left: auto; padding: 6px 12px; border-radius: 999px;
    background: rgba(0, 0, 0, 0.55); color: #fff; font-size: 13px;
}
.add-row { display: flex; gap: 8px; margin-top: 12px; }
.add-row input { flex: 1; min-width: 0; }
.add-row .btn { flex-shrink: 0; width: 52px; padding: 0; }

/* ---------------- Programme ---------------- */
.day { position: relative; padding-left: 26px; }
.day::before { content: ""; position: absolute; left: 17px; top: 44px; bottom: -16px; width: 2px; background: repeating-linear-gradient(180deg, #D9BF8B 0 6px, transparent 6px 12px); }
.day:last-of-type::before { display: none; }
.day-num {
    position: absolute; left: 0; top: 14px; width: 36px; height: 36px; border-radius: 50%; z-index: 1;
    background: var(--gold); color: #fff; font-family: var(--serif); font-weight: 700; font-size: 17px;
    display: flex; align-items: center; justify-content: center; border: 3px solid var(--sand);
}
.day .card { padding-left: 22px; }
.moment { display: flex; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.moment:first-of-type { border-top: 0; }
.moment .when { width: 74px; flex-shrink: 0; font-size: 11px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--gold); padding-top: 3px; }
.moment .what { flex: 1; font-size: 15px; font-weight: 600; }

/* ---------------- Barres de progression ---------------- */
.bar { height: 8px; border-radius: 99px; background: rgba(43, 26, 18, 0.09); overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 99px; background: var(--gold); transition: width 0.4s ease; }
.bar.accent i { background: var(--accent); }
.bar.over i { background: var(--red); }
.big-number { font-family: var(--serif); font-size: 40px; font-weight: 700; line-height: 1; letter-spacing: -0.02em; }
.big-number small { font-family: var(--sans); font-size: 14px; font-weight: 700; color: var(--muted); letter-spacing: 0; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.split div { background: var(--sand); border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; }
.split span { display: block; font-size: 11px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.split b { font-size: 17px; }

/* ---------------- Listes à cocher ---------------- */
.acc-head { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; }
.acc-head .grow { flex: 1; }
.acc-head .fa-chevron-down { color: var(--muted); transition: transform 0.2s; }
.acc-head.open .fa-chevron-down { transform: rotate(180deg); }
.group-title { font-size: 11px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold); margin: 16px 0 4px; }
.check { display: flex; align-items: center; gap: 12px; padding: 9px 0; border-top: 1px solid var(--line); }
.check:first-child { border-top: 0; }
.check .box {
    width: 28px; height: 28px; flex-shrink: 0; border-radius: 9px; border: 2px solid #CDBBA5; background: var(--paper);
    display: flex; align-items: center; justify-content: center; color: transparent; font-size: 13px;
}
.check.done .box { background: var(--green); border-color: var(--green); color: #fff; }
.check .txt { flex: 1; font-size: 15px; font-weight: 600; text-align: left; }
.check.done .txt { color: var(--muted); text-decoration: line-through; }
.check .del { width: 34px; height: 34px; color: #B9A797; font-size: 14px; flex-shrink: 0; }

/* ---------------- Urgences ---------------- */
.sos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.sos a { background: var(--red); color: #fff; border-radius: 18px; padding: 14px 8px; text-align: center; box-shadow: 0 12px 20px -14px var(--red); }
.sos b { display: block; font-family: var(--serif); font-size: 28px; line-height: 1.1; }
.sos span { font-size: 11px; font-weight: 700; opacity: 0.92; }

/* ---------------- Barre de navigation du bas ---------------- */
.nav {
    flex-shrink: 0; display: grid; grid-template-columns: repeat(5, 1fr);
    padding: 8px 6px calc(8px + env(safe-area-inset-bottom, 0px));
    background: rgba(255, 253, 249, 0.96); border-top: 1px solid var(--line);
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.nav button { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 6px 2px; border-radius: 14px; color: var(--muted); font-size: 11px; font-weight: 700; }
.nav button i { font-size: 19px; }
.nav button.on { color: var(--terracotta); }
.nav button.on i { transform: translateY(-1px); }
.nav button.on::after { content: ""; width: 18px; height: 3px; border-radius: 3px; background: var(--gold); margin-top: 1px; }
.nav button:not(.on)::after { content: ""; width: 18px; height: 3px; margin-top: 1px; }

/* ---------------- Fenêtres qui montent du bas ---------------- */
.overlay {
    position: absolute; inset: 0; z-index: 50; display: flex; align-items: flex-end;
    overflow: hidden;
    background: rgba(25, 12, 6, 0.55); opacity: 0; visibility: hidden; transition: opacity 0.25s, visibility 0.25s;
}
.overlay.open { opacity: 1; visibility: visible; }
.sheet {
    width: 100%; max-height: 92%; display: flex; flex-direction: column;
    background: var(--sand); border-radius: 28px 28px 0 0; overflow: hidden;
    transform: translateY(100%); transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.overlay.open .sheet { transform: translateY(0); }
.sheet-head { flex-shrink: 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 18px 12px; }
.sheet-head h2 { font-family: var(--serif); font-size: 22px; font-weight: 700; }
.sheet-body { overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 0 18px 18px; display: grid; gap: 14px; }
.sheet-foot { flex-shrink: 0; display: flex; gap: 10px; padding: 12px 18px calc(14px + env(safe-area-inset-bottom, 0px)); background: var(--paper); border-top: 1px solid var(--line); }
.sheet-foot .btn { flex: 1; }
.sheet-foot .btn.narrow { flex: 0 0 52px; padding: 0; }
.sheet .photo { border-radius: 0; aspect-ratio: 16 / 11; flex-shrink: 0; }
.sheet .photo .close { position: absolute; right: 14px; top: 14px; background: rgba(20, 10, 5, 0.6); color: #fff; border: 0; }
.sheet.place-sheet .sheet-body { padding-top: 18px; }
.sheet h2.title { font-family: var(--serif); font-size: 25px; line-height: 1.2; font-weight: 700; }
.sheet .desc { font-size: 15px; color: var(--ink-soft); }
.store { padding: 12px 0; border-top: 1px solid var(--line); }
.store:first-of-type { border-top: 0; }
.store b { display: block; font-size: 14px; }
.store em { display: block; font-style: normal; font-weight: 700; color: var(--terracotta); font-size: 14px; }
.store span { font-size: 13px; color: var(--ink-soft); }
.actions { display: grid; gap: 10px; }

.confirm { align-items: center; justify-content: center; padding: 24px; z-index: 70; }
.confirm .box { width: 100%; max-width: 360px; background: var(--paper); border-radius: 24px; padding: 22px; text-align: center; display: grid; gap: 16px; transform: scale(0.94); transition: transform 0.2s; }
.confirm.open .box { transform: scale(1); }
.confirm p { font-family: var(--serif); font-size: 19px; font-weight: 700; }

/* ---------------- Messages courts ---------------- */
.toasts { position: absolute; left: 16px; right: 16px; top: max(14px, env(safe-area-inset-top)); z-index: 80; display: grid; gap: 8px; pointer-events: none; }
.toast { justify-self: center; background: var(--ink); color: #fff; font-size: 14px; font-weight: 700; padding: 12px 18px; border-radius: 999px; box-shadow: 0 12px 30px -10px rgba(0, 0, 0, 0.5); animation: pop 0.25s ease; }
@keyframes pop { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: none; } }

.empty { text-align: center; padding: 34px 20px; color: var(--muted); }
.empty i { font-size: 34px; color: var(--gold); margin-bottom: 10px; }
.empty h3 { font-family: var(--serif); font-size: 19px; color: var(--ink); margin-bottom: 4px; }
.empty .btn { margin-top: 14px; }

@media (prefers-reduced-motion: reduce) {
    * { transition: none !important; animation: none !important; }
}

/* ---- Synchronisation entre téléphones : petit nuage dans la barre du haut */
.sync-dot { font-size: 0.55em; margin-left: 6px; vertical-align: middle; color: var(--muted); background: none; border: 0; padding: 6px; cursor: pointer; transition: color .3s; }
.sync-dot.ok, .sync-info .ok { color: var(--green); }
.sync-dot.busy, .sync-info .busy { color: var(--gold); }
.sync-dot.off, .sync-info .off { color: var(--red); }
.sync-info {
    position: absolute; top: 100%; left: 16px; right: 16px; z-index: 60; margin-top: 6px;
    padding: 14px 16px; border-radius: 18px; font-size: 13px; line-height: 1.45; color: var(--ink);
    background: rgba(255, 253, 249, 0.82); border: 1px solid rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4);
    box-shadow: var(--shadow);
}
.sync-info p { margin: 6px 0; }
.sync-info .now { font-weight: 700; font-size: 14px; margin-top: 0; }

/* ---- Galerie de photos Google dans la fiche d'un lieu */
.gallery { display: flex; gap: 8px; overflow-x: auto; padding: 10px 16px 0; -webkit-overflow-scrolling: touch; }
.gallery img { width: 72px; height: 72px; flex: 0 0 auto; object-fit: cover; border-radius: 12px; border: 2px solid transparent; cursor: pointer; }
.gallery img.on { border-color: var(--gold); }
.credit { font-size: 11px; margin: 6px 16px 0; }

/* ---- Marrakech : petit bouton "changer de destination" et photo du logement */
.back-mini { flex: 0 0 auto; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; color: var(--accent); background: rgba(255, 255, 255, 0.6); border: 1px solid var(--line); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); text-decoration: none; }
.logement-photo { width: 100%; height: 170px; object-fit: cover; border-radius: 16px; margin-bottom: 12px; }
