/* MaPêcheSession : mobile-first, sombre par défaut. Une couleur d'accent par technique (--accent). */
:root {
  /* Même identité que MaPêcheConnect : noir profond, violet et or, cartes en verre */
  --bg: #03040a; --bg2: #090713; --card: rgba(15,14,27,.68); --line: rgba(255,255,255,.10);
  --text: #f7f7fb; --muted: #b9b5c7;
  --purple: #8b42ff; --purple2: #b35cff; --gold: #d8a34d; --gold2: #f3d58a;
  --water: #b35cff; --sand: #f3d58a;
  --accent: #d8a34d; --danger: #ff5a5a; --ok: #48ff99;
  --radius: 26px; --radius-sm: 18px; --nav-h: 68px;
  --shadow: 0 18px 54px rgba(0,0,0,.28);
  --page-bg: radial-gradient(900px 520px at 85% -10%, rgba(139,66,255,.22), transparent 60%),
             radial-gradient(700px 480px at -10% 30%, rgba(216,163,77,.10), transparent 60%), #03040a;
}
:root[data-theme="light"] {
  --bg: #f6f3fb; --bg2: #ebe5f5; --card: rgba(255,255,255,.82); --line: rgba(60,30,100,.14);
  --text: #1a1328; --muted: #615a74; --water: #6b2fd0; --sand: #8a6420;
  --page-bg: radial-gradient(900px 520px at 85% -10%, rgba(139,66,255,.14), transparent 60%), #f6f3fb;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--page-bg) fixed; color: var(--text);
  font: 16px/1.45 Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom));
}
a { color: var(--water); }
h1 { font-size: 1.5rem; margin: 0 0 .75rem; font-weight: 900; background: linear-gradient(90deg, var(--purple2), var(--gold2) 60%); -webkit-background-clip: text; background-clip: text; color: transparent; }
h2 { font-size: 1.1rem; margin: 1.25rem 0 .5rem; }
.muted { color: var(--muted); font-size: .9rem; }
.hidden { display: none !important; }

/* Mise en page */
#app { max-width: 640px; margin: 0 auto; padding: 16px 16px 24px; min-height: 100vh; }
.topbar { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.topbar h1 { margin: 0; flex: 1; }
.banner { background: var(--card); backdrop-filter: blur(14px); border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; margin-bottom: 12px; font-size: .9rem; }
.banner.warn { border-color: var(--sand); }
.banner button { margin-top: 6px; }

/* Cartes et listes */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin-bottom: 14px; box-shadow: var(--shadow); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); }
.card.accent { border-left: 6px solid var(--accent); }
.row { display: flex; align-items: center; gap: 10px; }
.row.between { justify-content: space-between; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.stat { text-align: center; }
.stat b { display: block; font-size: 1.6rem; color: var(--accent); }
.list-item { display: flex; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.list-item:last-child { border-bottom: 0; }
.list-item .grow { flex: 1; min-width: 0; }
.list-item .t { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dot { width: 12px; height: 12px; border-radius: 50%; background: var(--accent); flex: none; }
.thumb { width: 52px; height: 52px; border-radius: 10px; object-fit: cover; background: var(--bg2); flex: none; }
.chip { display: inline-block; padding: 2px 10px; border-radius: 999px; background: var(--bg2); border: 1px solid var(--line); font-size: .8rem; color: var(--muted); }
.chip.on { background: var(--accent); color: #120b04; border-color: var(--accent); font-weight: 600; }

/* Boutons : grands, utilisables d'une main (mains mouillées, gants) */
button, .btn {
  font: inherit; font-weight: 800; min-height: 54px; padding: 0 20px; border-radius: 14px;
  border: 1px solid rgba(139,66,255,.32); background: var(--mpc-wash-0_04-value-f8d551cb0e, rgba(255,255,255,.035)); color: var(--text); cursor: pointer; text-decoration: none;
  transition: transform .2s ease, box-shadow .2s ease;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
}
button.primary, .btn.primary { background: linear-gradient(135deg, var(--gold2), var(--gold)); border-color: rgba(243,213,138,.68); color: #120b04; font-weight: 900; box-shadow: 0 14px 38px rgba(216,163,77,.18); }
button:active { transform: scale(.98); }
button.danger { background: transparent; border-color: var(--danger); color: var(--danger); }
button.small { min-height: 40px; padding: 0 12px; font-size: .9rem; }
button.block { width: 100%; }
button:disabled { opacity: .5; }
button.google { background: var(--mpc-raised-1-value-e08de71387, #fff); color: #222; border-color: var(--mpc-line-1-value-4d32d7d0c0, #ddd); box-shadow: none; }

/* Formulaires */
label { display: block; margin: 12px 0 4px; font-weight: 600; font-size: .9rem; }
input, select, textarea {
  font: inherit; width: 100%; min-height: 52px; padding: 10px 14px; border-radius: 12px;
  background: var(--mpc-wash-0_05-value-2ed3367aa6, rgba(255,255,255,.045)); color: var(--text); border: 1px solid var(--line);
}
select option { background: var(--mpc-canvas-1-value-2ea974adc1, #090713); color: var(--mpc-ink-1-value-ccdc3d2662, #f7f7fb); }
textarea { min-height: 90px; resize: vertical; }
input[type="checkbox"], input[type="radio"] { width: 24px; min-height: 24px; height: 24px; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--purple2); outline-offset: 1px; }
.check { display: flex; align-items: center; gap: 10px; font-weight: 400; margin: 8px 0; }
.big-input { font-size: 2rem; text-align: center; min-height: 72px; }
.err { color: var(--danger); font-size: .9rem; min-height: 1.2em; margin: 8px 0; }
.choices { display: flex; flex-wrap: wrap; gap: 8px; }
.choices .chip { padding: 10px 14px; font-size: 1rem; cursor: pointer; }
.tech-card { flex: 1 1 140px; border: 2px solid var(--line); border-radius: var(--radius-sm); padding: 18px 10px; text-align: center; font-weight: 700; cursor: pointer; background: var(--card); }
.tech-card.on { border-color: var(--c); background: color-mix(in srgb, var(--c) 18%, var(--card)); }
.tech-card.off { opacity: .45; }

/* Navigation du bas */
nav.tabs {
  position: fixed; left: 0; right: 0; bottom: 0; height: calc(var(--nav-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom); background: var(--mpc-canvas-0_82-value-c6b969ad36, rgba(4,5,12,.82)); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); border-top: 1px solid var(--line);
  display: grid; grid-template-columns: repeat(6, 1fr); z-index: 20;
}
nav.tabs a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: var(--muted); text-decoration: none; font-size: .72rem; }
nav.tabs a svg { width: 24px; height: 24px; }
nav.tabs a.on { color: var(--gold2); }
nav.tabs a.fab { position: relative; }
nav.tabs a.fab span.bubble {
  position: absolute; top: -22px; width: 62px; height: 62px; border-radius: 50%; background: linear-gradient(135deg, var(--gold2), var(--gold)); color: #120b04;
  display: flex; align-items: center; justify-content: center; box-shadow: 0 8px 26px rgba(216,163,77,.35), 0 0 34px rgba(139,66,255,.25); border: 4px solid var(--bg);
}
nav.tabs a.fab small { margin-top: 34px; color: var(--text); font-weight: 600; }
body.no-nav nav.tabs { display: none; }
body.no-nav { padding-bottom: 0; }

/* Fenêtre du bas (formulaires rapides) */
.sheet-back { position: fixed; inset: 0; background: var(--mpc-canvas-0_65-value-4166c5bd76, rgba(0,0,0,.65)); backdrop-filter: blur(4px); z-index: 50; display: flex; align-items: flex-end; justify-content: center; }
.sheet { background: var(--bg2); width: 100%; max-width: 640px; max-height: 92vh; overflow-y: auto; border-radius: 22px 22px 0 0; padding: 18px 16px calc(24px + env(safe-area-inset-bottom)); border-top: 3px solid var(--accent); }
.sheet h2 { margin-top: 0; }
.photo-drop { display: flex; align-items: center; justify-content: center; min-height: 140px; border: 2px dashed var(--line); border-radius: var(--radius); background: var(--bg2); overflow: hidden; cursor: pointer; }
.photo-drop img { width: 100%; max-height: 260px; object-fit: cover; }

/* Divers */
#toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--nav-h) + 20px); background: linear-gradient(135deg, var(--gold2), var(--gold)); color: #120b04; padding: 12px 18px; border-radius: 999px; z-index: 99; font-weight: 600; max-width: 90vw; }
#map { height: calc(100vh - 250px); min-height: 300px; border-radius: var(--radius); border: 1px solid var(--line); }
.auth-wrap { max-width: 420px; margin: 0 auto; padding-top: 6vh; }
.logo { display: flex; align-items: center; gap: 10px; font-size: 1.6rem; font-weight: 800; margin-bottom: 18px; }
.logo svg { width: 44px; height: 44px; }
.timer { font-size: 2.2rem; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--accent); }
.bars { display: flex; align-items: flex-end; gap: 3px; height: 90px; }
.bars i { flex: 1; background: var(--accent); border-radius: 3px 3px 0 0; min-height: 2px; }
.locked { position: relative; }
.locked::after { content: "Premium"; position: absolute; right: 12px; top: 12px; background: var(--sand); color: #0b1a17; font-size: .7rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
td, th { padding: 8px 6px; border-bottom: 1px solid var(--line); text-align: left; }
.tabsbar { display: flex; gap: 6px; overflow-x: auto; margin-bottom: 12px; }

/* ---------- Réseau : fil de prises, profils ---------- */
.topbar { flex-wrap: wrap; }
.ghost { background: transparent; border-color: var(--line); }
.avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; flex: none; display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--purple), var(--gold)); color: var(--mpc-ink-1-value-e08de71387, #fff); font-weight: 800; }
.avatar.big { width: 76px; height: 76px; font-size: 1.8rem; }
.post { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 18px; overflow: hidden; box-shadow: var(--shadow); backdrop-filter: blur(20px); }
.post-head { display: flex; align-items: center; gap: 10px; padding: 12px 14px; }
.post-head a { text-decoration: none; color: inherit; }
.post-img { display: block; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; background: var(--bg2); }
.post-body { padding: 12px 14px 14px; }
.post-title { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.post-title b { font-size: 1.1rem; }
.post-title .chip { margin-left: auto; }
.post-actions { display: flex; gap: 8px; margin-top: 10px; }
.post-actions .small { min-height: 44px; }
button.liked { color: #ff5a8a; border-color: #ff5a8a; }
.live { display: flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; font-size: 1.05rem; }
.live .grow { flex: 1; }
.pulse { width: 12px; height: 12px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 0 rgba(72,255,153,.6); animation: pulse 1.8s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 12px rgba(72,255,153,0); } 100% { box-shadow: 0 0 0 0 rgba(72,255,153,0); } }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.tile img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; border-radius: 6px; background: var(--bg2); }
.comment { padding: 8px 0; border-bottom: 1px solid var(--line); }
.comment:last-child { border-bottom: 0; }
.comment a { color: inherit; }
.map-thumb { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; border: 3px solid var(--gold); box-shadow: 0 2px 8px var(--mpc-shadow-0_5-value-fd9af3c8e7, rgba(0,0,0,.5)); background: var(--mpc-canvas-1-value-2ea974adc1, #090713); }

/* ---------- Carte à calques, fiches, espèces, compétitions ---------- */
.map-wrap { position: relative; }
.layer-panel { position: absolute; top: 10px; right: 10px; z-index: 500; width: 250px; padding: 14px; border-radius: var(--radius-sm);
  background: var(--mpc-canvas-0_92-value-215f4a9f9f, rgba(9,7,19,.92)); border: 1px solid var(--line); backdrop-filter: blur(14px); box-shadow: var(--shadow); }
:root[data-theme="light"] .layer-panel { background: var(--mpc-raised-0_95-value-54b4f5dda5, rgba(255,255,255,.95)); }
.pin { width: 34px; height: 34px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); background: linear-gradient(135deg, var(--gold2), var(--gold));
  display: flex; align-items: center; justify-content: center; border: 2px solid var(--mpc-line-1-value-e08de71387, #fff); box-shadow: 0 3px 10px var(--mpc-shadow-0_5-value-fd9af3c8e7, rgba(0,0,0,.5)); }
.pin span { transform: rotate(45deg); display: block; font-size: 16px; line-height: 1; }
.lmap { height: 220px; border-radius: var(--radius-sm); margin-top: 12px; border: 1px solid var(--line); }
.two-col { display: block; }
.species-grid, .events-grid { display: grid; grid-template-columns: 1fr; gap: 10px; }
.species-card { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--card);
  border: 1px solid var(--line); text-decoration: none; color: inherit; min-width: 0; }
.fish-ico { width: 44px; height: 44px; border-radius: 12px; background: linear-gradient(145deg, rgba(139,66,255,.2), rgba(216,163,77,.1)); border: 1px solid rgba(139,66,255,.25);
  display: flex; align-items: center; justify-content: center; font-size: 1.3rem; flex: none; }
.ev-logo { width: 52px; height: 52px; border-radius: 12px; object-fit: contain; background: var(--mpc-raised-1-value-e08de71387, #fff); display: inline-flex; align-items: center; justify-content: center; font-size: 1.6rem; }
.event .row { align-items: flex-start; }

/* ---------- Version ordinateur : menu du haut comme un site web ---------- */
#topnav { display: none; }
@media (min-width: 900px) {
  body, body.no-nav { padding-bottom: 0; }
  nav.tabs { display: none; }
  #topnav { display: block; position: sticky; top: 0; z-index: 40; background: var(--mpc-canvas-0_85-value-dca6c20fb6, rgba(4,5,12,.85)); backdrop-filter: blur(20px); border-bottom: 1px solid var(--line); }
  :root[data-theme="light"] #topnav { background: var(--mpc-raised-0_9-value-c95321928b, rgba(246,243,251,.9)); }
  #topnav:empty { display: none; }
  .topnav-in { max-width: 1280px; margin: 0 auto; padding: 10px 24px; display: flex; align-items: center; gap: 4px; }
  .topnav-in a { color: var(--muted); text-decoration: none; padding: 8px 12px; border-radius: 12px; font-weight: 700; }
  .topnav-in a:hover, .topnav-in a.on { color: var(--text); background: var(--mpc-wash-0_06-value-5704ef9ed3, rgba(255,255,255,.06)); }
  .topnav-in a.on { color: var(--gold2); }
  .topnav-in .brand { display: flex; align-items: center; gap: 8px; color: var(--text); margin-right: 14px; padding: 0; }
  .topnav-in .brand svg { width: 34px; height: 34px; }
  .topnav-in .grow { flex: 1; }
  .topnav-in button { margin: 0 8px; min-height: 42px; }
  #app { max-width: 680px; padding-top: 28px; }
  #app.wide { max-width: 1180px; }
  #map { height: calc(100vh - 220px); }
  .two-col { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(300px, 1fr); gap: 28px; align-items: start; }
  .species-grid { grid-template-columns: repeat(3, 1fr); }
  .events-grid { grid-template-columns: repeat(2, 1fr); }
  .tiles { gap: 8px; }
  #toast { bottom: 24px; }
}
@media (min-width: 1200px) { .species-grid { grid-template-columns: repeat(4, 1fr); } .events-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 899px) { .species-grid { grid-template-columns: 1fr 1fr; } }
