/* ============================================================
   Fishing Pro Weather Center â€” ThÃ¨me Lumineux "Cockpit CÃ´tier"
   Fond blanc, haute lisibilitÃ© en plein soleil, Ã©purÃ© & rÃ©actif
   ============================================================ */

:root {
  --ocean-950: #f8fafc;
  --ocean-900: #ffffff;
  --ocean-850: #f1f5f9;
  --ocean-800: #e2e8f0;
  --ocean-700: #cbd5e1;
  --ocean-600: #94a3b8;
  --ocean-card: #ffffff;
  --ocean-card-hover: #f8fafc;
  
  --cyan: #0284c7;
  --cyan-bright: #0284c7;
  --cyan-glow: rgba(2, 132, 199, 0.15);
  --blue-sky: #0369a1;
  --emerald: #10b981;
  --emerald-glow: rgba(16, 185, 129, 0.15);
  --amber: #f59e0b;
  --amber-glow: rgba(245, 158, 11, 0.15);
  --rose: #ef4444;
  --rose-glow: rgba(239, 68, 68, 0.15);
  --purple: #7c3aed;
  
  --text-main: #0f172a;
  --text-sub: #334155;
  --text-muted: #64748b;
  
  --border: #e2e8f0;
  --border-hover: #cbd5e1;
  --border-active: #0284c7;
  
  --radius-xl: 18px;
  --radius-lg: 14px;
  --radius-md: 10px;
  --radius-sm: 6px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background-color: var(--ocean-950);
  background-image: 
    radial-gradient(at 10% 10%, rgba(2, 132, 199, 0.04) 0px, transparent 40%),
    radial-gradient(at 90% 20%, rgba(16, 185, 129, 0.04) 0px, transparent 40%),
    radial-gradient(at 50% 90%, rgba(245, 158, 11, 0.03) 0px, transparent 50%);
  background-attachment: fixed;
  color: var(--text-main);
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

a { color: var(--cyan); text-decoration: none; }
a:hover { color: #0369a1; text-decoration: underline; }

.text-cyan { color: var(--cyan) !important; }
.text-emerald { color: var(--emerald) !important; }
.text-amber { color: var(--amber) !important; }
.text-rose { color: var(--rose) !important; }
.text-muted { color: var(--text-muted) !important; }
.bg-ocean-light { background: #f1f5f9 !important; color: #334155 !important; }

/* ---------- En-tÃªte Sticky Navbar (FixÃ©e en haut) ---------- */
.fpc-navbar, .fpc-header {
  background: #ffffff;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 1040;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.05);
}

.fpc-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.fpc-brand .logo {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #0284c7, #0ea5e9);
  color: #fff;
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.25);
  flex-shrink: 0;
}

.fpc-brand h1 {
  font-size: 16px;
  margin: 0;
  font-weight: 800;
  line-height: 1.2;
}

.fpc-brand small {
  display: block;
  font-weight: 500;
  color: var(--text-muted);
  font-size: 11px;
}

/* Onglets dans la navbar */
.fpc-tabbar-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.tabbar-btn {
  background: #f8fafc;
  border: 1px solid var(--border);
  color: var(--text-sub);
  font-size: 13px;
  font-weight: 700;
  padding: 7px 14px;
  border-radius: 999px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.tabbar-btn:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: var(--text-main);
}

.tabbar-btn.active {
  background: #0284c7;
  border-color: #0284c7;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.3);
}
.tabbar-btn.active i { color: #ffffff !important; }

/* ---------- Recherche ---------- */
.search-wrap {
  position: relative;
  min-width: 240px;
  flex: 1;
  max-width: 380px;
}

.search-wrap .form-control {
  background: #f8fafc;
  border: 1px solid var(--border);
  color: var(--text-main);
  border-radius: var(--radius-md);
  height: 38px;
  padding-left: 36px;
  padding-right: 36px;
  font-size: 13.5px;
  transition: all 0.2s ease;
}

.search-wrap .form-control:focus {
  background: #ffffff;
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px var(--cyan-glow);
  color: var(--text-main);
}

.search-wrap .form-control::placeholder {
  color: var(--text-muted);
}

.search-icon-left {
  position: absolute;
  left: 11px;
  top: 10px;
  color: var(--text-muted);
  pointer-events: none;
}

.search-clear-btn {
  position: absolute;
  right: 10px;
  top: 8px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 16px;
  cursor: pointer;
  padding: 0;
  display: none;
}
.search-clear-btn:hover { color: var(--text-main); }

.search-spinner {
  position: absolute;
  right: 12px;
  top: 11px;
}

.autocomplete {
  position: absolute;
  top: 46px;
  left: 0;
  right: 0;
  background: #ffffff;
  border: 1px solid var(--border);
  color: var(--text-main);
  border-radius: var(--radius-md);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.12);
  overflow: hidden;
  z-index: 1050;
  max-height: 360px;
  overflow-y: auto;
}

.autocomplete .item {
  padding: 10px 14px;
  cursor: pointer;
  border-bottom: 1px solid #f1f5f9;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  transition: background 0.15s;
}

.autocomplete .item:last-child { border-bottom: none; }
.autocomplete .item:hover, .autocomplete .item.active { background: #f0f9ff; }
.autocomplete .item .name { font-weight: 600; color: var(--text-main); font-size: 13.5px; }
.autocomplete .item .meta { color: var(--text-muted); font-size: 12px; white-space: nowrap; }

/* Quick spot chips */
.quick-spots {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.spot-chip {
  background: #f1f5f9;
  border: 1px solid var(--border);
  color: var(--text-sub);
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.spot-chip:hover {
  background: #e0f2fe;
  border-color: #7dd3fc;
  color: #0369a1;
}

/* Boutons & Selects Header */
.fpc-btn {
  background: #ffffff;
  border: 1px solid var(--border);
  color: var(--text-main);
  border-radius: var(--radius-md);
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
  cursor: pointer;
}

.fpc-btn:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: var(--text-main);
}

.fpc-btn-primary {
  background: #0284c7;
  border: 1px solid #0284c7;
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(2, 132, 199, 0.25);
}
.fpc-btn-primary:hover {
  background: #0369a1;
  border-color: #0369a1;
  color: #ffffff;
}

.select-cockpit {
  background: #ffffff;
  border: 1px solid var(--border);
  color: var(--text-main);
  border-radius: var(--radius-md);
  height: 34px;
  font-size: 12.5px;
  font-weight: 600;
  padding: 0 26px 0 10px;
  cursor: pointer;
  transition: all 0.15s;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%2364748b' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 8px center;
  background-size: 10px 8px;
}
.select-cockpit:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px var(--cyan-glow);
  outline: none;
}
.select-cockpit option {
  background: #ffffff;
  color: var(--text-main);
}

/* ---------- Cards Layout ---------- */
.fpc-main { padding: 18px 0 60px; }

.fpc-card {
  background: var(--ocean-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
  padding: 20px;
  height: auto;
  position: relative;
  transition: border-color 0.2s, box-shadow 0.2s;
  color: var(--text-main);
}

.fpc-card:hover {
  border-color: var(--border-hover);
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
}

.fpc-card h2, .fpc-card h3 {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.01em;
  margin: 0 0 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-main);
}

.section-title {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 800;
  color: var(--cyan);
  margin: 24px 0 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.section-title::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #e2e8f0;
}

/* Spot Hero Card */
.place-hero-card {
  background: linear-gradient(135deg, #ffffff 0%, #f0f9ff 100%);
  border: 1px solid #bae6fd;
  box-shadow: 0 4px 16px rgba(2, 132, 199, 0.06);
}

.place-coords-badge {
  background: #ffffff;
  border: 1px solid var(--border);
  padding: 2px 7px;
  border-radius: 6px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11.5px;
  color: var(--text-sub);
  cursor: pointer;
}
.place-coords-badge:hover {
  background: #e0f2fe;
  color: var(--cyan);
}

/* ---------- KPI Widgets ---------- */
.kpi-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.2s ease;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.03);
}
.kpi-card:hover {
  background: #ffffff;
  border-color: #cbd5e1;
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.06);
}

.kpi-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}
.kpi-label {
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}
.kpi-icon-wrap {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: #f0f9ff;
  color: var(--cyan);
  font-size: 15px;
}

.kpi-value {
  font-size: 26px;
  font-weight: 900;
  line-height: 1.1;
  color: var(--text-main);
  margin-bottom: 4px;
}
.kpi-sub {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.3;
}

/* ---------- Score Dial & Card ---------- */
.score-hero-container {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.score-dial {
  --pct: 75;
  --ring: var(--emerald);
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: conic-gradient(var(--ring) calc(var(--pct) * 1%), #f1f5f9 0);
  display: grid;
  place-items: center;
  position: relative;
  flex: 0 0 auto;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08);
}

.score-dial::after {
  content: "";
  position: absolute;
  inset: 12px;
  background: #ffffff;
  border-radius: 50%;
  box-shadow: inset 0 2px 4px rgba(15, 23, 42, 0.05);
}

.score-dial .inner {
  position: relative;
  z-index: 1;
  text-align: center;
}

.score-dial .score-num {
  font-size: 40px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.04em;
}

.score-dial .score-denom {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
}

.prime-window-badge {
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  border-radius: var(--radius-md);
  padding: 10px 14px;
  margin-top: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Badges de niveau */
.badge-level {
  border-radius: 999px;
  padding: 4px 12px;
  font-weight: 800;
  font-size: 11.5px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.lvl-excellent { background: #ecfdf5; color: #047857; border: 1px solid #a7f3d0; }
.lvl-good { background: #f0f9ff; color: #0369a1; border: 1px solid #bae6fd; }
.lvl-medium { background: #fffbeb; color: #b45309; border: 1px solid #fde68a; }
.lvl-poor { background: #fff7ed; color: #c2410c; border: 1px solid #fed7aa; }
.lvl-bad { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
.lvl-unknown { background: #f1f5f9; color: #64748b; }

.safety-ok { background: #ecfdf5; color: #047857; border: 1px solid #a7f3d0; }
.safety-watch { background: #fffbeb; color: #b45309; border: 1px solid #fde68a; }
.safety-danger { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }

/* Facteurs du score */
.factor {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 3px 8px;
  align-items: center;
  margin-bottom: 9px;
}
.factor .fname { font-size: 12px; font-weight: 600; color: var(--text-sub); }
.factor .fval { font-size: 12px; font-weight: 700; color: var(--text-main); }
.factor .bar {
  grid-column: 1/-1;
  height: 6px;
  border-radius: 99px;
  background: #f1f5f9;
  overflow: hidden;
}
.factor .bar > span { display: block; height: 100%; border-radius: 99px; }
.bar-good { background: #10b981; }
.bar-mid { background: #f59e0b; }
.bar-bad { background: #ef4444; }

/* Alertes & SÃ©curitÃ© */
.alert-item {
  border-radius: var(--radius-md);
  padding: 10px 12px;
  margin-bottom: 8px;
  border-left: 4px solid var(--cyan);
  background: #f8fafc;
  border-top: 1px solid var(--border);
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.alert-danger { border-left-color: var(--rose); background: #fef2f2; }
.alert-watch { border-left-color: var(--amber); background: #fffbeb; }
.alert-item .t { font-weight: 800; font-size: 13px; color: var(--text-main); margin-bottom: 2px; }
.alert-item .m { font-size: 12px; color: var(--text-sub); }

/* Ã‰phÃ©mÃ©ride & Solunaire */
.ephem-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.ephem-box {
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 10px;
  text-align: center;
}
.ephem-icon { font-size: 24px; margin-bottom: 2px; display: inline-block; }
.ephem-title { font-size: 11px; text-transform: uppercase; color: var(--text-muted); font-weight: 700; }
.ephem-val { font-size: 15px; font-weight: 800; color: var(--text-main); }

/* ---------- Graphiques ---------- */
.chart-box {
  position: relative;
  width: 100%;
  height: 300px;
}
.chart-box canvas { width: 100%!important; height: 100%!important; }

.fpc-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  background: #f1f5f9;
  padding: 3px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}
.fpc-tab-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.fpc-tab-btn:hover { color: var(--text-main); background: #e2e8f0; }
.fpc-tab-btn.active {
  background: #ffffff;
  color: var(--cyan);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
}

/* ---------- Instruments Nautiques ---------- */
.nautical-wrap {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}
.nautical-tile {
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 12px;
  text-align: center;
  transition: all 0.2s;
}
.nautical-tile:hover {
  background: #ffffff;
  border-color: #cbd5e1;
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.05);
}
.nautical-tile .ttl {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.nautical-subinfo { font-size: 12px; }

/* ---------- PrÃ©visions 7 jours ---------- */
.daily-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 8px;
}
.daily-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 8px;
  text-align: center;
  cursor: pointer;
  transition: all 0.15s ease;
}
.daily-card:hover, .daily-card.active {
  background: #f0f9ff;
  border-color: #38bdf8;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.08);
}
.daily-card .d-name { font-size: 11.5px; font-weight: 800; text-transform: uppercase; color: var(--text-muted); }
.daily-card .d-icon { font-size: 24px; margin: 4px 0; }
.daily-card .d-temp { font-size: 13.5px; font-weight: 700; color: var(--text-main); }
.daily-card .d-wind { font-size: 11.5px; color: var(--text-muted); margin-top: 2px; }
.daily-card .d-wave { font-size: 11.5px; color: var(--cyan); margin-top: 2px; font-weight: 600; }

/* Table 7 jours */
.fpc-table {
  color: var(--text-main);
  border-color: #e2e8f0;
  font-size: 13px;
}
.fpc-table th {
  background: #f8fafc;
  color: var(--text-muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--border);
  padding: 8px 10px;
}
.fpc-table td {
  padding: 10px;
  vertical-align: middle;
  border-bottom: 1px solid #f1f5f9;
}
.fpc-table tr:hover td {
  background: #f8fafc;
}

/* ---------- Carte Leaflet & Curseur Fixe ---------- */
#map, #bigmap {
  cursor: crosshair !important;
}
.leaflet-container {
  cursor: crosshair !important;
}
.leaflet-grab {
  cursor: grab !important;
}
.leaflet-dragging .leaflet-grab {
  cursor: grabbing !important;
}

#map {
  height: 320px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  z-index: 1;
}

#bigmap {
  width: 100%;
  height: 500px;
  z-index: 1;
  background: #f1f5f9;
}

.map-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

#bigmap-card {
  position: relative;
  border: 1px solid #bae6fd;
  box-shadow: 0 4px 18px rgba(2, 132, 199, 0.08);
  border-radius: var(--radius-xl);
  overflow: hidden;
}

.bigmap-toolbar {
  padding: 10px 16px;
  background: #ffffff;
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.bigmap-legend {
  padding: 8px 16px;
  background: #f8fafc;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  font-size: 12px;
  color: var(--text-sub);
}
.bigmap-legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

/* RepÃ¨re mobile et curseur personnalisÃ© pour la pÃªche */
.custom-spot-marker {
  cursor: grab !important;
}
.custom-spot-marker:active {
  cursor: grabbing !important;
}
.target-pulse-pin {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #0284c7;
  border: 3px solid #ffffff;
  box-shadow: 0 0 0 4px rgba(2, 132, 199, 0.35), 0 6px 14px rgba(0,0,0,0.25);
  position: relative;
  animation: targetPing 2s infinite cubic-bezier(0, 0, 0.2, 1);
}
@keyframes targetPing {
  0% { box-shadow: 0 0 0 0 rgba(2, 132, 199, 0.6), 0 4px 10px rgba(0,0,0,0.2); }
  70% { box-shadow: 0 0 0 12px rgba(2, 132, 199, 0), 0 4px 10px rgba(0,0,0,0.2); }
  100% { box-shadow: 0 0 0 0 rgba(2, 132, 199, 0), 0 4px 10px rgba(0,0,0,0.2); }
}

/* Pastille statut spot */
.spot-status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

/* ---------- Module Spots & Filtres Statut / DÃ©partement ---------- */
.spot-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.spot-status-btn, .spot-type-btn {
  background: #f8fafc;
  border: 1px solid var(--border);
  color: var(--text-sub);
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.spot-status-btn:hover, .spot-type-btn:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: var(--text-main);
}
.spot-status-btn.active, .spot-type-btn.active {
  background: #0284c7;
  border-color: #0284c7;
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(2, 132, 199, 0.25);
}

.btn-stat-allowed.active { background: #10b981 !important; border-color: #10b981 !important; }
.btn-stat-regulated.active { background: #f59e0b !important; border-color: #f59e0b !important; }
.btn-stat-forbidden.active { background: #ef4444 !important; border-color: #ef4444 !important; }
.btn-stat-legendary.active { background: #d97706 !important; border-color: #d97706 !important; }

/* Grille des spots */
.spots-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}

.spot-item-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.2s ease;
  position: relative;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.04);
}
.spot-item-card:hover {
  background: #ffffff;
  border-color: #93c5fd;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
}
.spot-item-card.is-legendary {
  border-color: #fde68a;
  background: linear-gradient(180deg, #fffdfa 0%, #ffffff 100%);
}
.spot-item-card.is-legendary::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, #f59e0b, #0284c7);
}

.spot-item-card.is-forbidden {
  border-color: #fecaca;
  background: linear-gradient(180deg, #fffafa 0%, #ffffff 100%);
}
.spot-item-card.is-forbidden::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: #ef4444;
}

.spot-item-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}
.spot-item-title {
  font-size: 14px;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.3;
  margin: 0;
}
.spot-item-dist {
  font-size: 11px;
  font-weight: 700;
  background: #f0f9ff;
  color: #0284c7;
  padding: 2px 7px;
  border-radius: 999px;
  white-space: nowrap;
}

.spot-item-type {
  font-size: 11.5px;
  color: var(--text-muted);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 8px;
}

.spot-species-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 10px;
}
.species-tag {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  color: var(--text-sub);
  font-size: 11px;
  font-weight: 600;
  border-radius: 6px;
  padding: 2px 6px;
}

.spot-meta-row {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-bottom: 5px;
  display: flex;
  align-items: center;
  gap: 5px;
}
.spot-meta-row strong { color: var(--text-main); }

.spot-actions-bar {
  display: flex;
  gap: 6px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid #f1f5f9;
}

/* Badges Statuts Spots */
.badge-status-allowed {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
}
.badge-status-regulated {
  background: #fffbeb;
  color: #b45309;
  border: 1px solid #fde68a;
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
}
.badge-status-forbidden {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
}

/* Badges Ã‰tats de la mer (Behar) */
.badge-sea-calm {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
}
.badge-sea-slight {
  background: #f0f9ff;
  color: #0284c7;
  border: 1px solid #bae6fd;
}
.badge-sea-moderate {
  background: #fffbeb;
  color: #b45309;
  border: 1px solid #fde68a;
}
.badge-sea-danger {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

/* Modale Fiche Tactique PÃªche */
.tactical-section {
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px;
  margin-bottom: 12px;
}
.tactical-section-title {
  font-size: 11.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--cyan);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 5px;
}

/* Modal Styling */
.modal-content.cockpit-modal {
  background: #ffffff;
  border: 1px solid var(--border);
  color: var(--text-main);
  border-radius: var(--radius-xl);
  box-shadow: 0 20px 45px rgba(15, 23, 42, 0.15);
}
.modal-header.cockpit-modal-header {
  background: #f8fafc;
  border-bottom: 1px solid var(--border);
}
.modal-footer.cockpit-modal-footer {
  background: #f8fafc;
  border-top: 1px solid var(--border);
}

/* Pill list & badges */
.pill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.pill {
  background: #f1f5f9;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 11.5px;
  cursor: pointer;
  font-weight: 600;
  color: var(--text-sub);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.15s;
}
.pill:hover {
  background: #e0f2fe;
  border-color: #7dd3fc;
  color: #0369a1;
}
.pill .x {
  color: var(--text-muted);
  font-size: 13px;
  padding: 0 2px;
}
.pill .x:hover { color: var(--rose); }

/* Reporting Strip */
.reporting-strip-inline {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.rep-kpi-mini {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 5px 8px;
  transition: all 0.15s ease;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.rep-kpi-mini:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
}
.rep-kpi-mini .rep-kpi-icon {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  display: grid;
  place-items: center;
  background: #f0f9ff;
  color: var(--cyan);
  font-size: 13px;
  flex-shrink: 0;
}
.rep-kpi-mini .rep-icon-safety { background: #ecfdf5; color: var(--emerald); }
.rep-kpi-mini .rep-icon-temp   { background: #fffbeb; color: var(--amber); }
.rep-kpi-mini .rep-icon-wind   { background: #f0f9ff; color: var(--cyan); }
.rep-kpi-mini .rep-icon-wave   { background: #f0f9ff; color: #0284c7; }
.rep-kpi-mini .rep-icon-moon   { background: #f5f3ff; color: var(--purple); }

.rep-kpi-mini .rep-kpi-label {
  font-size: 9.5px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  line-height: 1;
}
.rep-kpi-mini .rep-kpi-val {
  font-size: 13px;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.1;
  margin-top: 1px;
}

/* Tabs */
.app-tab {
  display: none;
  animation: tabFadeIn 0.2s ease;
}
.app-tab.active { display: block; }
@keyframes tabFadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Ã‰tats */
.state-loading, .state-empty, .state-error {
  border-radius: var(--radius-md);
  padding: 20px;
  text-align: center;
  font-size: 13.5px;
}
.state-loading { background: #f8fafc; color: var(--text-muted); border: 1px solid var(--border); }
.state-empty { background: #f8fafc; color: var(--text-muted); border: 1px dashed var(--border); }
.state-error { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }

.fpc-card-auto { height: auto !important; }

/* Responsive adjustments */
@media (max-width: 991px) {
  .score-hero-container { justify-content: center; text-align: center; }
  .search-wrap { min-width: 100%; order: 3; }
  .reporting-strip-inline { width: 100%; justify-content: flex-start; }
  #bigmap { height: 400px; }
}

@media (max-width: 576px) {
  .score-dial { width: 120px; height: 120px; }
  .score-dial .score-num { font-size: 32px; }
  .kpi-value { font-size: 22px; }
  .fpc-card { padding: 14px; }
  .tabbar-btn span { font-size: 11.5px; }
  .tabbar-btn { padding: 5px 10px; }
  #bigmap { height: 320px; }
}

/* ============================================================
   Module Spots & RÃ©glementation â€” ajouts spÃ©cifiques
   ============================================================ */

/* Pastilles des spots OSM sur la carte */
.custom-spot-pin {
  cursor: pointer;
}
.custom-spot-pin:hover {
  filter: brightness(1.1);
}

/* Bandeau de rÃ©glementation dÃ©partementale */
#dept-regulation-banner {
  background: linear-gradient(135deg, #f0f9ff 0%, #ffffff 60%, #ecfdf5 100%) !important;
  border-color: var(--border) !important;
}
#dept-regulation-banner .fw-bold {
  letter-spacing: -0.01em;
}

/* Grille des spots : hauteur homogÃ¨ne */
.spot-item-card {
  min-height: 168px;
}
.spot-actions-bar {
  margin-top: 10px;
}

/* Filtres de type */
.spot-type-btn {
  white-space: nowrap;
}

/* Modal de fiche spot */
.modal-content.cockpit-modal .modal-body {
  max-height: 70vh;
}

/* ============================================================
   Assistant IA open source (panneau latï¿½ral)
   ============================================================ */
.ia-fab {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 1080;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, #0284c7, #0ea5e9);
  color: #fff;
  font-weight: 800;
  font-size: 13px;
  letter-spacing: -0.01em;
  box-shadow: 0 12px 28px rgba(2, 132, 199, 0.35);
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease;
}
.ia-fab .bi { font-size: 17px; }
.ia-fab:hover { transform: translateY(-2px); box-shadow: 0 16px 34px rgba(2, 132, 199, 0.45); }
.ia-fab[aria-expanded="true"] { background: #0f172a; box-shadow: 0 12px 26px rgba(15, 23, 42, .35); }

.ia-panel {
  position: fixed;
  right: 20px;
  bottom: 84px;
  z-index: 1080;
  width: 396px;
  height: 580px;
  max-height: calc(100vh - 110px);
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: 0 24px 60px rgba(15, 23, 42, .22);
  overflow: hidden;
  animation: ia-pop .16s ease-out;
}
@keyframes ia-pop {
  from { opacity: 0; transform: translateY(10px) scale(.98); }
  to   { opacity: 1; transform: none; }
}

.ia-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  background: linear-gradient(135deg, #0f172a, #0369a1);
  color: #fff;
}
.ia-avatar {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, .14);
  border: 1px solid rgba(255, 255, 255, .22);
  font-size: 17px;
  flex-shrink: 0;
}
.ia-title { font-weight: 800; font-size: 13.5px; line-height: 1.2; }
.ia-sub {
  font-size: 10.5px;
  opacity: .82;
  max-width: 250px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ia-close {
  border: 0;
  background: rgba(255, 255, 255, .12);
  color: #fff;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  cursor: pointer;
}
.ia-close:hover { background: rgba(255, 255, 255, .24); }

.ia-banner {
  padding: 8px 14px;
  background: #fffbeb;
  border-bottom: 1px solid #fde68a;
  color: #92400e;
  font-size: 11.5px;
  line-height: 1.35;
}

.ia-messages {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
  background: #f8fafc;
  display: flex;
  flex-direction: column;
  gap: 10px;
  scroll-behavior: smooth;
}

.ia-msg {
  max-width: 90%;
  padding: 10px 12px;
  border-radius: 14px;
  font-size: 12.5px;
  line-height: 1.5;
  word-wrap: break-word;
  overflow-wrap: anywhere;
}
.ia-msg.assistant {
  align-self: flex-start;
  background: #fff;
  border: 1px solid var(--border);
  color: var(--text-main);
  border-bottom-left-radius: 5px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
}
.ia-msg.user {
  align-self: flex-end;
  background: linear-gradient(135deg, #0284c7, #0ea5e9);
  color: #fff;
  border-bottom-right-radius: 5px;
  font-weight: 600;
}
.ia-msg.error {
  align-self: flex-start;
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
  font-weight: 600;
}
.ia-msg .ia-li { padding-left: 2px; margin: 2px 0; }
.ia-msg .ia-gap { height: 5px; }
.ia-msg .ia-text strong { color: #0f172a; }

.ia-sources {
  margin-top: 8px;
  padding-top: 7px;
  border-top: 1px dashed var(--border);
  font-size: 10.5px;
  color: var(--text-muted);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
}
.ia-source {
  background: #f1f5f9;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 2px 8px;
  color: #334155;
  font-weight: 600;
}

.ia-typing { display: inline-flex; align-items: center; gap: 4px; padding: 12px 14px; }
.ia-typing span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #94a3b8;
  animation: ia-bounce 1.1s infinite ease-in-out;
}
.ia-typing span:nth-child(2) { animation-delay: .15s; }
.ia-typing span:nth-child(3) { animation-delay: .3s; }
@keyframes ia-bounce {
  0%, 60%, 100% { transform: translateY(0); opacity: .55; }
  30% { transform: translateY(-4px); opacity: 1; }
}

.ia-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 9px 12px;
  background: #fff;
  border-top: 1px solid var(--border);
  max-height: 96px;
  overflow-y: auto;
}
.ia-chip {
  border: 1px solid #bae6fd;
  background: #f0f9ff;
  color: #075985;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: background .12s ease, border-color .12s ease;
}
.ia-chip:hover { background: #e0f2fe; border-color: #7dd3fc; }

.ia-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-top: 1px solid var(--border);
  background: #fff;
}
.ia-web-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  color: #475569;
  border-radius: 999px;
  padding: 5px 11px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: background .12s ease, border-color .12s ease;
}
.ia-web-toggle[aria-pressed="true"] {
  border-color: #7dd3fc;
  background: #e0f2fe;
  color: #075985;
}
.ia-web-toggle .bi { font-size: 12px; }
.ia-web-state { font-size: 10.5px; color: var(--text-muted); }

.ia-source.ia-link {
  text-decoration: none;
  color: #0369a1;
  border-color: #bae6fd;
  background: #f0f9ff;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ia-source.ia-link:hover { background: #e0f2fe; text-decoration: underline; }

.ia-webnote {
  margin-top: 7px;
  font-size: 10.5px;
  color: var(--text-muted);
  display: flex;
  gap: 5px;
  align-items: flex-start;
  line-height: 1.35;
}
.ia-webnote.is-error { color: #b45309; }

.ia-form {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 10px 12px;
  border-top: 1px solid var(--border);
  background: #fff;
}
.ia-form textarea {
  flex: 1;
  resize: none;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 9px 11px;
  font-size: 12.5px;
  line-height: 1.4;
  max-height: 96px;
  outline: none;
  font-family: inherit;
  color: var(--text-main);
  background: #f8fafc;
}
.ia-form textarea:focus {
  border-color: var(--border-active);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(2, 132, 199, .12);
}
.ia-send {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(135deg, #0284c7, #0ea5e9);
  color: #fff;
  cursor: pointer;
  display: grid;
  place-items: center;
  box-shadow: 0 4px 12px rgba(2, 132, 199, .25);
}
.ia-send:hover { filter: brightness(1.05); }
.ia-send:disabled { opacity: .55; cursor: wait; }

.ia-foot {
  padding: 7px 12px 9px;
  font-size: 10px;
  color: var(--text-muted);
  background: #fff;
  text-align: center;
  border-top: 1px solid #f1f5f9;
  line-height: 1.35;
}

@media (max-width: 575.98px) {
  .ia-panel {
    right: 8px;
    left: 8px;
    bottom: 76px;
    width: auto;
    height: calc(100vh - 96px);
    max-height: none;
    border-radius: 16px;
  }
  .ia-fab { right: 14px; bottom: 14px; padding: 12px 14px; }
  .ia-fab-label { display: none; }
  .ia-msg { max-width: 94%; font-size: 12.5px; }
}

/* ============================================================
   Fiche de zone â€” refonte 2026
   LisibilitÃ©, hiÃ©rarchie et rÃ©glementation visible au premier regard
   ============================================================ */

.fpc-navbar {
  background: rgba(255, 255, 255, 0.92);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  backdrop-filter: saturate(160%) blur(14px);
}

.place-hero-card {
  background:
    radial-gradient(120% 180% at 0% 0%, rgba(2, 132, 199, 0.10) 0%, transparent 55%),
    radial-gradient(120% 180% at 100% 100%, rgba(16, 185, 129, 0.08) 0%, transparent 55%),
    linear-gradient(135deg, #ffffff 0%, #f8fcff 100%);
}

[data-zone-open] {
  cursor: pointer;
}
[data-zone-open]:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
}

.zone-kind-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: 6px;
  padding: 2px 7px;
  border-radius: 999px;
  background: #eef2ff;
  border: 1px solid #e0e7ff;
  color: #4338ca;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.01em;
  white-space: nowrap;
}
.zone-kind-chip .bi { font-size: 9px; }

/* En-tÃªte de la fiche */
.zone-sheet-top {
  position: relative;
  overflow: hidden;
  padding: 18px 18px 16px 22px;
  border: 1px solid #e0f2fe;
  border-radius: 16px;
  background:
    radial-gradient(140% 160% at 100% 0%, rgba(14, 165, 233, 0.10) 0%, transparent 60%),
    linear-gradient(135deg, #ffffff 0%, #f4fbff 100%);
}
.zone-sheet-top::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: linear-gradient(180deg, #0284c7, #38bdf8);
}
.zone-sheet.is-regulated .zone-sheet-top::before { background: linear-gradient(180deg, #f59e0b, #fbbf24); }
.zone-sheet.is-forbidden .zone-sheet-top::before { background: linear-gradient(180deg, #ef4444, #f87171); }
.zone-sheet.is-regulated .zone-sheet-top { border-color: #fde68a; }
.zone-sheet.is-forbidden .zone-sheet-top { border-color: #fecaca; }

.zone-sheet-kicker {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--cyan);
}
.zone-sheet-sep { color: #cbd5e1; }

.zone-sheet-title {
  margin: 6px 0 10px;
  font-size: clamp(19px, 2.4vw, 25px);
  line-height: 1.18;
  font-weight: 900;
  letter-spacing: -0.025em;
  color: var(--text-main);
}

.zone-sheet-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.zone-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  color: var(--text-sub);
  font-size: 10.5px;
  font-weight: 700;
}
.zone-chip .bi { font-size: 10px; color: var(--cyan); }
.zone-chip-primary {
  background: #e0f2fe;
  border-color: #bae6fd;
  color: #075985;
}
.zone-chip-primary .bi { color: #0284c7; }
.zone-chip-warn {
  background: #fffbeb;
  border-color: #fde68a;
  color: #92400e;
}
.zone-chip-warn .bi { color: #d97706; }
.zone-chip-ok {
  background: #ecfdf5;
  border-color: #a7f3d0;
  color: #047857;
}
.zone-chip-ok .bi { color: #059669; }
.zone-chip-gold {
  background: #fff7ed;
  border-color: #fed7aa;
  color: #9a3412;
}
.zone-chip-gold .bi { color: #f59e0b; }

/* Corps en deux colonnes : fiche Ã  gauche, rÃ©glementation Ã  droite */
.zone-sheet-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  gap: 14px;
  margin-top: 14px;
  align-items: start;
}
@media (max-width: 859.98px) {
  .zone-sheet-grid { grid-template-columns: minmax(0, 1fr); }
}

.zone-panel {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
}
.zone-panel-rules {
  background:
    radial-gradient(120% 140% at 100% 0%, rgba(245, 158, 11, 0.08) 0%, transparent 60%),
    linear-gradient(180deg, #fffdf7 0%, #ffffff 100%);
  border-color: #fde68a;
  position: sticky;
  top: 12px;
}
@media (max-width: 859.98px) {
  .zone-panel-rules { position: static; }
}

.zone-panel-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 10px;
  margin-bottom: 4px;
  border-bottom: 1px solid #f1f5f9;
}
.zone-panel-head h4 {
  margin: 0;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: -0.01em;
  color: var(--text-main);
}
.zone-panel-head p {
  margin: 1px 0 0;
  font-size: 10.5px;
  color: var(--text-muted);
}
.zone-panel-icon {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: #e0f2fe;
  color: #0284c7;
  font-size: 15px;
}
.zone-panel-icon-rules {
  background: #fef3c7;
  color: #b45309;
}

.zone-field { margin-top: 12px; }
.zone-field > span {
  display: block;
  margin-bottom: 3px;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted);
}
.zone-field p {
  margin: 0;
  font-size: 12px;
  line-height: 1.55;
  color: var(--text-sub);
}
.zone-species, .zone-techs {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.zone-techs .badge {
  font-size: 10.5px !important;
  font-weight: 600 !important;
  border-radius: 8px !important;
}

.zone-mini-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 14px;
}
@media (max-width: 420px) {
  .zone-mini-grid { grid-template-columns: 1fr; }
}
.zone-mini {
  display: grid;
  grid-template-columns: 18px 1fr;
  grid-template-rows: auto auto;
  column-gap: 6px;
  padding: 9px 10px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #f8fafc;
}
.zone-mini .bi {
  grid-row: 1 / span 2;
  align-self: start;
  margin-top: 1px;
  color: var(--cyan);
  font-size: 13px;
}
.zone-mini span {
  font-size: 9.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}
.zone-mini strong {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-sub);
  line-height: 1.4;
}

.zone-safety {
  display: flex;
  gap: 9px;
  margin-top: 12px;
  padding: 10px 11px;
  border-radius: 10px;
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #78350f;
}
.zone-safety.is-danger {
  background: #fef2f2;
  border-color: #fecaca;
  color: #7f1d1d;
}
.zone-safety > .bi { font-size: 15px; flex: 0 0 16px; margin-top: 1px; }
.zone-safety strong {
  display: block;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.zone-safety p {
  margin: 2px 0 0;
  font-size: 11.5px;
  line-height: 1.45;
}

/* RÃ©glementation */
.zone-reg-rows {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.zone-reg-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 9px 0;
  border-bottom: 1px solid #f1f5f9;
}
.zone-reg-row:last-child { border-bottom: 0; }
.zone-reg-row > .bi {
  flex: 0 0 16px;
  margin-top: 2px;
  font-size: 13px;
  color: var(--cyan);
}
.zone-reg-row span {
  display: block;
  font-size: 9.5px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}
.zone-reg-row p {
  margin: 1px 0 0;
  font-size: 11.5px;
  line-height: 1.45;
  color: var(--text-sub);
}
.zone-reg-row.is-danger > .bi { color: #ef4444; }
.zone-reg-row.is-danger p { color: #b91c1c; font-weight: 700; }

.zone-reg-block {
  margin-top: 10px;
  padding: 11px 12px;
  border: 1px solid #fde68a;
  border-radius: 11px;
  background: #fffdf7;
}
.zone-reg-zone {
  border-color: #fecaca;
  background: #fffafa;
}
.zone-reg-title {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
  font-size: 10.5px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #92400e;
}
.zone-reg-zone .zone-reg-title { color: #b91c1c; }
.zone-reg-strong {
  font-size: 12px;
  font-weight: 800;
  color: var(--text-main);
}
.zone-reg-block .zone-reg-rows { gap: 0; }
.zone-reg-block .zone-reg-rows > div {
  padding: 6px 0;
  border-bottom: 1px dashed #e2e8f0;
}
.zone-reg-block .zone-reg-rows > div:last-child { border-bottom: 0; }
.zone-reg-block .zone-reg-rows span {
  display: block;
  font-size: 9.5px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}
.zone-reg-block .zone-reg-rows p {
  margin: 1px 0 0;
  font-size: 11px;
  line-height: 1.42;
  color: var(--text-sub);
}
.zone-reg-block .zone-reg-rows .is-danger p { color: #b91c1c; }
.zone-reg-foot {
  margin-top: 7px;
  font-size: 9.5px;
  line-height: 1.4;
  color: var(--text-muted);
  font-style: italic;
}
.zone-reg-foot-link {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 3px;
  font-style: normal;
}
.zone-reg-foot-link .zone-reg-source-label {
  color: #115e59;
  font-weight: 700;
  margin-right: 2px;
}
.zone-reg-foot-link .zone-reg-source-sep { color: #93b8b2; margin: 0 1px; }
.zone-reg-foot-link a {
  color: #0f766e;
  font-weight: 700;
  text-decoration: none;
}
.zone-reg-foot-link a:hover { text-decoration: underline; }

/* Précisions locales : repliées pour garder la fiche compacte. */
.zone-reg-details {
  margin-top: 6px;
  padding-top: 7px;
  border-top: 1px dashed #e2e8f0;
}
.zone-reg-details > summary {
  display: flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  list-style: none;
  font-size: 9.5px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #0f766e;
}
.zone-reg-details > summary::-webkit-details-marker { display: none; }
.zone-reg-details > summary::after {
  content: '▾';
  margin-left: auto;
  font-size: 10px;
  color: #5f8f88;
}
.zone-reg-details[open] > summary::after { content: '▴'; }
.zone-reg-details ul {
  margin: 6px 0 0;
  padding-left: 15px;
  list-style: disc;
}
.zone-reg-details li {
  margin-bottom: 4px;
  font-size: 10.5px;
  line-height: 1.45;
  color: var(--text-sub);
}
.zone-reg-details li:last-child { margin-bottom: 0; }

/* Provenance vérifiable des règles d'eau douce importées. */
.zone-reg-source {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
  margin-top: 8px;
  padding: 7px 9px;
  border: 1px solid #cce7e2;
  border-radius: 9px;
  background: linear-gradient(180deg, #f2fbf9 0%, #eaf8f4 100%);
  font-size: 10px;
  line-height: 1.35;
  color: #115e59;
}
.zone-reg-source i { color: #0f766e; font-size: 11px; }
.zone-reg-source a {
  color: #0f766e;
  font-weight: 800;
  text-decoration: none;
}
.zone-reg-source a:hover { text-decoration: underline; }
.zone-reg-source span { color: #5f8f88; font-weight: 600; }
.zone-reg-source .zone-reg-source-label { color: #115e59; font-weight: 700; }
.zone-reg-source .zone-reg-source-sep { color: #93b8b2; font-weight: 800; margin: 0 1px; }
.zone-reg-disclaimer {
  margin-top: 10px;
  padding-top: 9px;
  border-top: 1px solid #f1f5f9;
  font-size: 9.5px;
  line-height: 1.4;
  color: var(--text-muted);
}

/* Infobulle de carte */
.zone-map-tooltip.leaflet-tooltip {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.14);
  padding: 8px 10px;
  color: var(--text-main);
}
.zone-map-tooltip.leaflet-tooltip::before { border-top-color: #ffffff; }
.zone-tooltip-title {
  font-size: 12px;
  font-weight: 900;
  line-height: 1.25;
  margin-bottom: 2px;
}
.zone-tooltip-meta {
  font-size: 10px;
  color: var(--text-muted);
  margin-bottom: 4px;
}
.zone-tooltip-status { margin-bottom: 4px; }
.zone-tooltip-hint {
  font-size: 9.5px;
  font-weight: 700;
  color: var(--cyan);
}

/* Modale : plus large et sans double fond */
#spotDetailModal .modal-dialog { max-width: 960px; }
#spotDetailModal .modal-body { padding: 16px; background: #f8fafc; }
#spotDetailModal .modal-footer { gap: 8px; }

/* Puces espèces & techniques : compactes et lisibles */
.zone-species .species-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 999px;
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  color: #075985;
  font-size: 11px;
  font-weight: 700;
}
.zone-tech {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 8px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: var(--text-sub);
  font-size: 10.5px;
  font-weight: 600;
}
.zone-tech .bi { font-size: 9.5px; color: var(--cyan); }

/* L'assistant flottant ne doit pas masquer les actions de la fiche */
body.modal-open .ia-fab { display: none !important; }

/* ============================================================
   SÉLECTION DE ZONE — marqueur agrandi & violet, carte surlignée
   ============================================================ */
.custom-spot-pin {
  display: flex;
  align-items: center;
  justify-content: center;
}

.custom-spot-pin .csp-dot {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid #ffffff;
  box-shadow: 0 0 8px var(--zone-color, #38bdf8);
  transform-origin: 50% 50%;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

/* La sélection ne touche jamais au transform de Leaflet (positionnement) :
   seuls le point interne et son ombre changent. */
.custom-spot-pin.is-selected .csp-dot {
  background: var(--purple) !important;
  border-color: #ffffff;
  transform: scale(1.65);
  box-shadow:
    0 0 0 5px rgba(124, 58, 237, 0.2),
    0 0 18px rgba(124, 58, 237, 0.65);
}

.spot-item-card.is-selected {
  border-color: var(--purple);
  background: linear-gradient(180deg, #faf5ff 0%, #ffffff 100%);
  box-shadow:
    0 0 0 2px rgba(124, 58, 237, 0.22),
    0 10px 24px rgba(124, 58, 237, 0.16);
}

.spot-item-card.is-selected::after {
  content: "";
  position: absolute;
  left: 0;
  top: 12px;
  bottom: 12px;
  width: 4px;
  border-radius: 0 4px 4px 0;
  background: var(--purple);
}

.spot-item-card.is-selected .spot-item-title { color: #5b21b6; }

.spot-item-card.is-selected .spot-item-dist {
  background: #f3e8ff;
  color: #5b21b6;
  border-color: #ddd6fe;
}

/* ============================================================
   ASSISTANT IA INTÉGRÉ À LA FICHE (dans la modale)
   ============================================================ */
.zone-ai {
  margin-top: 16px;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-lg);
  background: #ffffff;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.04);
  overflow: hidden;
}

.zone-ai-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: linear-gradient(180deg, #faf5ff 0%, #ffffff 100%);
  border-bottom: 1px solid #f1f5f9;
}

.zone-ai-icon {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: linear-gradient(135deg, #7c3aed, #4f46e5);
  color: #ffffff;
  font-size: 15px;
  box-shadow: 0 4px 10px rgba(124, 58, 237, 0.28);
}

.zone-ai-title { min-width: 0; }

.zone-ai-title h4 {
  margin: 0;
  font-size: 13.5px;
  font-weight: 900;
  letter-spacing: -0.01em;
  color: var(--text-main);
}

.zone-ai-title p {
  margin: 1px 0 0;
  font-size: 10.5px;
  color: var(--text-muted);
}

.zone-ai-web {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid #ddd6fe;
  background: #f5f3ff;
  color: #5b21b6;
  font-size: 10.5px;
  font-weight: 700;
  cursor: pointer;
  user-select: none;
}

.zone-ai-web input { margin: 0; cursor: pointer; accent-color: var(--purple); }

.zone-ai-suggest {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 10px 14px 0;
}

.zone-ai-chip {
  border: 1px solid #ddd6fe;
  background: #f5f3ff;
  color: #5b21b6;
  font-size: 10.5px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.zone-ai-chip:hover { background: #ede9fe; border-color: #c4b5fd; }

.zone-ai-messages {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 14px;
  max-height: 290px;
  overflow-y: auto;
  scroll-behavior: smooth;
}

.mai-msg {
  max-width: 92%;
  padding: 9px 12px;
  border-radius: 12px;
  font-size: 12px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.mai-msg.assistant {
  align-self: flex-start;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: var(--text-sub);
  border-bottom-left-radius: 4px;
}

.mai-msg.user {
  align-self: flex-end;
  background: var(--cyan);
  color: #ffffff;
  font-weight: 600;
  border-bottom-right-radius: 4px;
}

.mai-msg.error {
  align-self: flex-start;
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
  font-weight: 600;
}

.mai-msg.is-typing {
  color: var(--text-muted);
  font-style: italic;
  animation: mai-pulse 1.4s ease-in-out infinite;
}

@keyframes mai-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}

.mai-msg .ia-li { padding-left: 2px; margin: 2px 0; }
.mai-msg .ia-gap { height: 5px; }
.mai-msg strong { color: var(--text-main); }

.mai-sources {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 8px;
}

.mai-source {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  max-width: 100%;
  padding: 2px 7px;
  border-radius: 6px;
  background: #eff6ff;
  border: 1px solid #dbeafe;
  color: #1d4ed8;
  font-size: 9.5px;
  font-weight: 700;
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mai-source.mai-link:hover { background: #dbeafe; text-decoration: underline; }
.mai-source.mai-link-web {
  background: #f8fafc;
  border-color: #e2e8f0;
  color: #475569;
  font-weight: 600;
}
.mai-source.mai-link-web:hover { background: #eef2f7; }
.mai-source.mai-link-web i { font-size: 9px; opacity: .8; }

.mai-webnote {
  margin-top: 7px;
  display: flex;
  align-items: flex-start;
  gap: 5px;
  font-size: 10px;
  line-height: 1.35;
  color: var(--text-muted);
}

.mai-webnote.is-error { color: #b45309; }

.zone-ai-form {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 14px 12px;
}

.zone-ai-form input {
  flex: 1;
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 9px 12px;
  font-size: 12.5px;
  color: var(--text-main);
  background: #ffffff;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.zone-ai-form input:focus {
  border-color: #a78bfa;
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.14);
}

.zone-ai-form button {
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: none;
  border-radius: 10px;
  background: linear-gradient(135deg, #7c3aed, #4f46e5);
  color: #ffffff;
  font-size: 14px;
  cursor: pointer;
  transition: filter 0.15s ease, transform 0.15s ease;
}

.zone-ai-form button:hover:not(:disabled) { filter: brightness(1.08); transform: translateY(-1px); }
.zone-ai-form button:disabled { opacity: 0.55; cursor: not-allowed; }

.zone-ai-note {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  padding: 0 14px 12px;
  font-size: 9.5px;
  color: var(--text-muted);
}

@media (max-width: 575.98px) {
  .zone-ai-messages { max-height: 220px; }
  .zone-ai-title p { display: none; }
}
