/* Le Carnet – mobile-first styles on top of Bootstrap 5.3 */
:root {
  --lc-ink: #1f1a2e;
  --lc-rose: #b8325d;
  --lc-rose-soft: #f8e5ec;
  --lc-cream: #fbf7f2;
  --lc-line: #e9e1d8;
  --lc-muted: #6b6475;
  --bs-body-bg: var(--lc-cream);
  --bs-body-color: var(--lc-ink);
  --bs-link-color: var(--lc-rose);
  --bs-link-color-rgb: 184, 50, 93;
  --bs-link-hover-color: #8e2246;
  --bs-link-hover-color-rgb: 142, 34, 70;
}

body { -webkit-font-smoothing: antialiased; }
a { text-decoration: none; }
a:hover { text-decoration: underline; }

.lc-h1, .lc-h2, .lc-brand, .lc-hero h1 {
  font-family: "Playfair Display", Georgia, "Times New Roman", serif;
}
.lc-h1 { font-size: 1.9rem; font-weight: 700; }
.lc-h2 { font-size: 1.25rem; font-weight: 700; margin: 1.25rem 0 .75rem; }
.lead-sm { font-size: 1.05rem; }

.skip-link { position: absolute; left: .5rem; top: .5rem; z-index: 2000; background: #fff; padding: .5rem 1rem; }

/* Nav */
.lc-nav { background: var(--lc-ink); }
.lc-brand { font-size: 1.4rem; letter-spacing: .02em; color: #fff !important; }
.lc-preview {
  background: var(--lc-rose); color: #fff; text-align: center;
  font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; padding: .2rem;
}

/* Hero */
.lc-hero {
  border-radius: 1rem; overflow: hidden; color: #fff;
  background: linear-gradient(rgba(31, 26, 46, .62), rgba(31, 26, 46, .78)), url("/paris-background.jpg") center / cover no-repeat, var(--lc-ink);
}
.lc-hero-inner { padding: 2.25rem 1.25rem; max-width: 40rem; }
.lc-hero .lead { color: rgba(255, 255, 255, .9); }
@media (min-width: 768px) { .lc-hero-inner { padding: 3.5rem 2.5rem; } }

/* Tiles (lists, areas) */
.lc-tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: .6rem; }
@media (min-width: 576px) { .lc-tiles { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 992px) { .lc-tiles { grid-template-columns: repeat(4, 1fr); } }
.lc-tiles-sm { grid-template-columns: repeat(3, 1fr); }
@media (min-width: 576px) { .lc-tiles-sm { grid-template-columns: repeat(5, 1fr); } }
.lc-tile {
  display: flex; flex-direction: column; justify-content: space-between; min-height: 4.5rem;
  background: #fff; border: 1px solid var(--lc-line); border-radius: .75rem; padding: .75rem .85rem;
  color: var(--lc-ink); transition: border-color .15s, transform .15s;
}
.lc-tile:hover { border-color: var(--lc-rose); text-decoration: none; transform: translateY(-1px); }
.lc-tile-name { font-weight: 600; line-height: 1.2; }
.lc-tile-count { font-size: .8rem; color: var(--lc-muted); margin-top: .35rem; }

/* Cards */
.lc-grid { display: grid; grid-template-columns: 1fr; gap: .75rem; }
@media (min-width: 768px) { .lc-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1200px) { .lc-grid { grid-template-columns: repeat(3, 1fr); } }
.lc-card {
  background: #fff; border: 1px solid var(--lc-line); border-radius: .75rem; padding: .9rem 1rem;
}
.lc-card h3 a, .lc-card h2 { color: var(--lc-ink); }
.lc-type { font-size: .85rem; color: var(--lc-muted); }
.lc-desc { font-size: .9rem; margin: .4rem 0 0; }
.lc-meta { display: flex; flex-direction: column; gap: .1rem; font-size: .8rem; color: var(--lc-muted); margin-top: .4rem; }
.lc-arr {
  flex: none; font-size: .75rem; font-weight: 700; background: var(--lc-ink); color: #fff;
  border-radius: 999px; padding: .1rem .55rem;
}
.lc-event { display: flex; gap: .85rem; }
.lc-date {
  flex: none; width: 4.2rem; text-align: center; font-size: .8rem; font-weight: 700; line-height: 1.2;
  background: var(--lc-rose-soft); color: var(--lc-rose); border-radius: .5rem; padding: .5rem .25rem; align-self: flex-start;
}

/* Flags */
.lc-flag {
  display: inline-block; font-size: .78rem; border-radius: .4rem; padding: .15rem .5rem; margin: 0 .25rem .25rem 0; line-height: 1.35;
}
.lc-flag-red { background: #fde8e8; color: #8a1c1c; }
.lc-flag-yellow { background: #fff6d6; color: #6b5200; }
.lc-flag-ok { background: #e6f4ea; color: #1e6b37; }
.lc-legend { background: #fff; border: 1px solid var(--lc-line); border-radius: .75rem; padding: .9rem 1rem; }

/* Detail pages */
.lc-detail { max-width: 46rem; }
.lc-facts { display: grid; grid-template-columns: 6rem 1fr; gap: .35rem 1rem; }
.lc-facts dt { color: var(--lc-muted); font-weight: 600; font-size: .9rem; }
.lc-facts dd { margin: 0; }
.lc-links li { margin-bottom: .35rem; }
.lc-link-role {
  display: inline-block; min-width: 4.5rem; font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; color: var(--lc-muted);
}
.lc-credit { background: var(--lc-rose-soft); border-radius: .75rem; padding: .9rem 1rem; }

/* Jump / filter chips */
.lc-jump { display: flex; flex-wrap: wrap; gap: .4rem; }
.lc-jump a {
  font-size: .8rem; border: 1px solid var(--lc-line); background: #fff; border-radius: 999px; padding: .2rem .65rem; color: var(--lc-ink);
}
.lc-jump a.active, .lc-jump a:hover { border-color: var(--lc-rose); color: var(--lc-rose); text-decoration: none; }

/* Footer */
.lc-footer { background: var(--lc-ink); color: rgba(255, 255, 255, .85); margin-top: 3rem; }
.lc-footer a { color: #f3b6c9; }

/* Admin */
.lc-adminbar { background: #3a2f52; color: #fff; font-size: .85rem; }
.lc-adminbar a { color: #f3d9e3; }
.lc-admin-table td, .lc-admin-table th { vertical-align: middle; font-size: .9rem; }
.lc-admin-form .form-label { font-weight: 600; font-size: .9rem; margin-bottom: .2rem; }
.lc-admin-form fieldset { background: #fff; border: 1px solid var(--lc-line); border-radius: .75rem; padding: .9rem 1rem; margin-bottom: 1rem; }
.lc-admin-form legend { font-size: 1rem; font-weight: 700; float: none; width: auto; padding: 0 .25rem; margin-bottom: .25rem; }
.lc-rowgrid { display: grid; grid-template-columns: 1fr; gap: .4rem; margin-bottom: .6rem; padding-bottom: .6rem; border-bottom: 1px dashed var(--lc-line); }
@media (min-width: 768px) { .lc-rowgrid.flags { grid-template-columns: 9rem 1fr; } .lc-rowgrid.links { grid-template-columns: 8rem 12rem 1fr; } }
.lc-tagboxes { columns: 1; }
@media (min-width: 576px) { .lc-tagboxes { columns: 2; } }
@media (min-width: 992px) { .lc-tagboxes { columns: 3; } }
.lc-savebar { position: sticky; bottom: 0; background: var(--lc-cream); border-top: 1px solid var(--lc-line); padding: .6rem 0; z-index: 10; }
.lc-narrow { max-width: 24rem; }

/* ---------- Mobile & touch ---------- */
html { -webkit-text-size-adjust: 100%; }
.lc-h1 { font-size: 1.6rem; }
@media (min-width: 768px) { .lc-h1 { font-size: 1.9rem; } }

/* iPhones zoom into inputs under 16px – keep them at 16px on phones and tablets */
@media (max-width: 991.98px) { .form-control, .form-select, .input-group .btn { font-size: 16px; } }

/* Long words and web addresses never push the page sideways */
.lc-card, .lc-detail, .lc-facts dd, .lc-desc, .lc-type, .lc-meta, .lc-tile-name { overflow-wrap: anywhere; }
.min-w-0 { min-width: 0; }

/* Anchored headings are not hidden under the sticky menu bar */
[id] { scroll-margin-top: 5rem; }

/* Comfortable tap targets (about 44px) */
.lc-jump a { display: inline-flex; align-items: center; min-height: 2.5rem; padding: .35rem .85rem; font-size: .85rem; }
.lc-nav .nav-link { padding-top: .6rem; padding-bottom: .6rem; }
.lc-maps { display: inline-flex; align-items: center; min-height: 2.5rem; font-size: .9rem; }
.lc-list li { margin-bottom: .6rem; }
.lc-list a, .lc-links a { display: inline-block; padding: .2rem 0; }
.lc-meta { font-size: .85rem; }
.lc-more { display: inline-block; padding: .5rem 0; }

/* On phones, filter chips scroll sideways in one row instead of stacking up */
@media (max-width: 767.98px) {
  .lc-jump-scroll { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none;
    margin-left: calc(-1 * var(--bs-gutter-x, .75rem)); margin-right: calc(-1 * var(--bs-gutter-x, .75rem));
    padding: 0 var(--bs-gutter-x, .75rem) .25rem; }
  .lc-jump-scroll::-webkit-scrollbar { display: none; }
  .lc-jump-scroll a { flex: none; }
  .lc-hero { border-radius: .75rem; }
  .lc-hero .btn { flex: 1 1 auto; }
}

/* Fact lists stack on very narrow screens; wider label column for tips */
@media (max-width: 359.98px) { .lc-facts { grid-template-columns: 1fr; } .lc-facts dd { margin-bottom: .5rem; } }
.lc-facts-wide { grid-template-columns: 1fr; }
.lc-facts-wide dd { margin-bottom: .6rem; }
@media (min-width: 768px) { .lc-facts-wide { grid-template-columns: 12rem 1fr; } .lc-facts-wide dd { margin-bottom: 0; } }

/* Language switch (always visible, also on phones) */
.lc-lang { display: inline-flex; border: 1px solid rgba(255, 255, 255, .35); border-radius: 999px; overflow: hidden; }
.lc-lang a { display: inline-flex; align-items: center; min-height: 2.25rem; padding: 0 .7rem; color: rgba(255, 255, 255, .8); font-size: .8rem; font-weight: 700; letter-spacing: .04em; }
.lc-lang a.active { background: #fff; color: var(--lc-ink); }
.lc-lang a:hover { text-decoration: none; color: #fff; }
.lc-lang a.active:hover { color: var(--lc-ink); }

/* iPhone home-bar / notch safe areas */
.lc-footer { padding-bottom: env(safe-area-inset-bottom); }
.lc-savebar { padding-bottom: calc(.6rem + env(safe-area-inset-bottom)); }

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

/* Safety tips */
.lc-tipgroup { background: #fff; border: 1px solid var(--lc-line); border-radius: .75rem; padding: 1rem 1.1rem; margin-bottom: 1rem; }
.lc-tipgroup h2 { margin-top: 0; }
.lc-tipgroup ul { padding-left: 1.1rem; margin-bottom: 0; }
.lc-tipgroup li { margin-bottom: .55rem; }
.lc-tip-src { display: block; font-size: .8rem; color: var(--lc-muted); }
.lc-emergency { display: grid; grid-template-columns: auto 1fr; gap: .35rem 1rem; align-items: baseline; }
.lc-emergency a { font-size: 1.25rem; font-weight: 700; color: var(--lc-rose); display: inline-block; min-width: 3.5rem; padding: .15rem 0; }
.lc-hero-links { display: flex; flex-wrap: wrap; gap: .5rem; }
.lc-fr { border-left: 3px solid #c9d7f0; padding-left: .6rem; }
.lc-report { white-space: pre-wrap; overflow-wrap: anywhere; max-height: 32rem; overflow: auto; background: var(--lc-cream); padding: .75rem; border-radius: .5rem; }
details summary { cursor: pointer; padding: .25rem 0; }

/* Le Carnet banner photo (evening, four friends walking up to Sacré-Cœur) */
.lc-hero {
  background: linear-gradient(180deg, rgba(31, 26, 46, .55), rgba(31, 26, 46, .82)),
              url("../img/le-carnet-hero-900.jpg") 38% 30% / cover no-repeat, var(--lc-ink);
}
@media (min-width: 768px) {
  .lc-hero { background-position: center, 34% 26%; }
  .lc-hero-inner { min-height: 20rem; }
}
@media (min-width: 1200px) {
  /* Wide screens: photo at full banner height on the left, text on the dark right side */
  .lc-hero {
    background: linear-gradient(270deg, rgba(31, 26, 46, 1) 0%, rgba(31, 26, 46, .95) 34%, rgba(31, 26, 46, .25) 52%, rgba(31, 26, 46, .05) 70%),
                url("../img/le-carnet-hero.jpg") left top / auto 100% no-repeat, var(--lc-ink);
    background-image: linear-gradient(270deg, rgba(31, 26, 46, 1) 0%, rgba(31, 26, 46, .95) 34%, rgba(31, 26, 46, .25) 52%, rgba(31, 26, 46, .05) 70%),
                      image-set(url("../img/le-carnet-hero.webp") type("image/webp"), url("../img/le-carnet-hero.jpg") type("image/jpeg"));
    background-position: center, left top;
    background-size: auto, auto 100%;
    background-repeat: no-repeat;
  }
  .lc-hero-inner { margin-left: auto; max-width: 30rem; min-height: 22rem; }
}
/* Comment box */
.lc-hp { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.lc-feedback-box { background: #fff; }
