/* Styles dedies a la partie publique. Le socle commun reste dans assets/custom.css. */

body.layout-public {
  background:
    radial-gradient(1200px 700px at 0% 0%, rgba(79, 70, 229, 0.10), transparent 55%),
    radial-gradient(900px 600px at 100% 0%, rgba(14, 165, 233, 0.10), transparent 48%),
    linear-gradient(180deg, rgba(255,255,255,0.82), rgba(255,255,255,0.28)),
    var(--app-bg);
}

.layout-public .app-navbar {
  background: rgba(255, 255, 255, 0.88);
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.layout-public .app-main {
  padding-top: 1.5rem;
  padding-bottom: 2.5rem;
}

.layout-public .app-brand-subtitle {
  color: rgba(71, 85, 105, 0.88);
}

.layout-public .seo-card,
.layout-public .report-container,
.layout-public .cardx,
.layout-public .mairie-detail-card,
.layout-public .mairie-card {
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
}

body.page-index.layout-public .app-main {
  padding-top: 1.25rem;
}

body.page-index.layout-public .report-submit-bar__inner {
  box-shadow: 0 16px 35px rgba(15, 23, 42, 0.12);
}

body.page-suivi.layout-public .wrap,
body.page-mairie.layout-public .container,
body.page-annuaire-mairies.layout-public .container {
  position: relative;
}

body.page-suivi.layout-public .wrap::before,
body.page-mairie.layout-public .container::before,
body.page-annuaire-mairies.layout-public .container::before {
  content: "";
  position: absolute;
  inset: -20px auto auto -20px;
  width: 140px;
  height: 140px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(79,70,229,.08), transparent 70%);
  pointer-events: none;
}

.layout-public .app-main { padding-top: 1rem; }
.page-index .app-main { padding-top: 1.1rem; }
.page-index .report-container { border-radius: 28px; box-shadow: var(--app-shadow-lg); }
.page-index .page-header h1,
.page-index h1.h2,
.page-index h1 {
  font-size: clamp(1.8rem, 1.2rem + 1.2vw, 2.8rem);
  letter-spacing: -.03em;
}

.page-index .page-header p { font-size: 1rem; }
.page-login .app-navbar .app-brand-subtitle { display: none; }
.page-login .app-main { padding-top: 2rem; }

body.page-offline {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 1rem;
}

body.page-offline .wrap { width: min(100%, 540px); }
body.page-offline .card {
  padding: clamp(1.5rem, 4vw, 2.25rem);
  border-radius: 28px;
  box-shadow: var(--app-shadow-lg);
  text-align: center;
}

body.page-offline h1 {
  font-size: clamp(1.6rem, 2vw, 2rem);
  font-weight: 900;
  color: var(--app-title);
}

body.page-offline .muted {
  color: var(--app-muted);
  margin-bottom: 1.25rem;
}

body.page-offline button {
  border: 0;
  border-radius: 14px;
  padding: .9rem 1.15rem;
  font-weight: 800;
  background: var(--app-primary);
  color: #fff;
  box-shadow: 0 14px 28px rgba(37,99,235,.22);
}

.report-shell { padding-top: 10px; padding-bottom: 80px; }
.report-container {
  background: var(--app-card);
  border: 1px solid var(--app-border);
  border-radius: var(--app-radius);
  box-shadow: var(--app-shadow);
  padding: clamp(14px, 2.5vw, 22px);
  backdrop-filter: blur(10px);
}

.mairie-pill {
  display:flex;
  align-items:center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 999px;
  background: rgba(255,255,255,.85);
  border: 1px solid var(--app-border);
  box-shadow: var(--app-shadow-sm);
  margin: 10px 0 16px;
}

.mairie-pill .fw-semibold { color: var(--app-title); }

@media (min-width: 992px) {
  .layout-public .app-main {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }

  .layout-public .app-navbar .container-fluid {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
}

.annuaire .mono { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; }
.annuaire .small-mono { font-size: .85rem; }
.annuaire .url { word-break: break-all; font-size: .9em; }
.annuaire td { vertical-align: top; }
.annuaire .card, .annuaire .card-body { overflow: hidden; }
.annuaire .dataTables_wrapper { max-width: 100% !important; overflow: hidden !important; }
.annuaire table.dataTable { width: 100% !important; max-width: 100% !important; table-layout: fixed; }
.annuaire table.dataTable td,
.annuaire table.dataTable th {
  white-space: normal !important;
  word-break: break-word;
}

.annuaire #tbl thead tr.filters th { padding: .35rem .5rem; }
.annuaire #tbl thead tr.filters input,
.annuaire #tbl thead tr.filters select { min-width: 110px; }

.timeline-wrap { position: relative; padding: 8px 6px 6px 6px; }
.timeline { position: relative; margin: 0; padding: 0 0 0 22px; list-style: none; }
.timeline::before {
  content:"";
  position:absolute;
  left: 10px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: linear-gradient(to bottom, rgba(148,163,184,.35), rgba(148,163,184,.10));
  border-radius: 99px;
}

.titem { position: relative; padding: 12px 0; }
.tdot {
  position:absolute; left: 2px; top: 18px;
  width: 18px; height: 18px; border-radius: 99px;
  background: #fff; border: 2px solid #94a3b8;
  box-shadow: 0 6px 14px rgba(15,23,42,.10);
}

.tdot.comment { border-color: #0ea5e9; }
.tdot.update { border-color: #94a3b8; }
.tcard {
  margin-left: 12px;
  background: #fff;
  border: 1px solid #e6edf5;
  border-radius: 14px;
  padding: 12px;
  box-shadow: 0 8px 18px rgba(15,23,42,.05);
}

.tmeta {
  display:flex; align-items:flex-start; justify-content: space-between;
  gap: 10px; margin-bottom: 6px; flex-wrap: wrap;
}

.tleft { display:flex; align-items:center; gap:8px; flex-wrap: wrap; }
.tright { display:flex; align-items:center; gap:10px; flex-wrap: wrap; justify-content: flex-end; }

.badgetype {
  font-size:.70rem; font-weight:900; letter-spacing:.06em;
  border-radius:999px; padding: 4px 10px;
  border:1px solid #e6edf5; background:#f8fafc; color:#334155;
  text-transform: uppercase;
}

.badgetype.comment { background: rgba(14,165,233,.10); border-color: rgba(14,165,233,.20); color:#075985; }
.badgetype.update { background: rgba(148,163,184,.18); border-color: rgba(148,163,184,.28); color:#334155; }
.ttime { font-size:.78rem; color:#64748b; white-space: nowrap; font-weight: 800; }
.tbody { margin-top: 8px; font-size:.95rem; color:#0f172a; white-space: pre-wrap; line-height: 1.45; }
.timeline-empty { color:#64748b; font-size: .95rem; padding: 10px 0; }
.badgevis {
  font-size:.72rem; font-weight:800; padding:.25rem .55rem;
  border-radius:999px; border:1px solid #e6edf5; background:#fff;
}

.badgevis.public { border-color:rgba(16,185,129,.35); color:#065f46; background:rgba(16,185,129,.10); }
.badgevis.private { border-color:rgba(100,116,139,.35); color:#334155; background:rgba(100,116,139,.10); }
.pub-label { font-size:.8rem; color:#64748b; }
.btn-del { font-size:.8rem; }

body.layout-public {
  --bg:#f6f8fb;
  --card:#fff;
  --border:#e6edf5;
  --muted:#64748b;
  --title:#0f172a;
  --primary:#0ea5e9;
  --slate:#94a3b8;
  --comment:#0ea5e9;
  --update:#94a3b8;
  --shadow: 0 10px 25px rgba(15,23,42,.06);
}

body.layout-public .wrap { max-width: 1280px; margin: 0 auto; }
body.layout-public .cardx { background: var(--card); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow); }
body.layout-public .section-label {
  font-size: .75rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--muted);
  margin-bottom: .75rem;
  display:block;
}

body.layout-public .kv { display:flex; flex-wrap:wrap; gap: 10px 16px; color:#0f172a; font-size: .92rem; }
body.layout-public .kv .item { display:flex; gap:8px; align-items:baseline; min-width: 220px; }
body.layout-public .kv .k { color: var(--muted); font-weight: 800; white-space: nowrap; }
body.layout-public .kv .v { font-weight: 800; }
body.layout-public .desc { background: #f1f5f9; border: 1px solid var(--border); border-radius: 14px; padding: 1rem; line-height: 1.55; }
body.layout-public .mapbox { height: 320px; border-radius: 16px; overflow:hidden; border:1px solid var(--border); box-shadow: 0 6px 18px rgba(15,23,42,.08); }
body.layout-public .thumb-grid { display:grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap:10px; }
body.layout-public .thumb-grid img {
  width:100%;
  aspect-ratio:1;
  object-fit:cover;
  border-radius:12px;
  cursor:pointer;
  border: 2px solid #fff;
  box-shadow: 0 6px 14px rgba(15,23,42,.10);
  transition: transform .15s ease, filter .15s ease;
}

body.layout-public .thumb-grid img:hover { transform: translateY(-2px); filter: brightness(.95); }
body.layout-public .stat-row { display:flex; flex-wrap:wrap; gap:10px; }
body.layout-public .stat-pill {
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #fff;
  font-size: .80rem;
  font-weight: 900;
  color: #334155;
}

body.layout-public .stat-pill.blue { background: rgba(14,165,233,.08); border-color: rgba(14,165,233,.20); color:#075985; }
body.layout-public .stat-pill.gray { background: rgba(148,163,184,.15); border-color: rgba(148,163,184,.25); color:#334155; }
body.layout-public .modal-photo-view .modal-content { background: transparent; border: none; }
body.layout-public #modalImage { border-radius: 14px; max-height: 85vh; width: auto; max-width: 100%; margin: 0 auto; display: block; }
body.layout-public .modal-backdrop.show { opacity: 0.85; }
body.layout-public button { border:0; background:#2563eb; color:#fff; padding:10px 14px; border-radius:12px; cursor:pointer; }
