:root {
  --pomco-navy: #1a365d;
  --pomco-primary: #1e4d7b;
  --pomco-primary-dark: #153a5e;
  --pomco-accent: #6b8f71;
  --pomco-accent-light: #e8f0e9;
  --pomco-primary-light: #e8f1f8;
  --pomco-surface: #ffffff;
  --pomco-surface-muted: #f4f7fb;
  --pomco-border: #d7e0ea;
  --pomco-text: #1e293b;
  --pomco-muted: #5b6b7c;
  --pomco-shadow: 0 8px 28px rgba(26, 54, 93, 0.08);
  --pomco-shadow-sm: 0 2px 10px rgba(26, 54, 93, 0.06);
  --pomco-radius: 14px;
  --pomco-radius-sm: 10px;
  --intro-logo-height: 260px;
}

* {
  box-sizing: border-box;
}

body {
  font-family: "Source Sans 3", "Segoe UI", system-ui, sans-serif;
  font-size: 16px;
  color: var(--pomco-text);
  overflow-x: hidden;
  background: linear-gradient(180deg, #eef3f8 0%, #f8fafc 220px, #f1f5f9 100%);
  line-height: 1.5;
}

body .container-fluid {
  padding-left: 0 !important;
  padding-right: 0 !important;
  max-width: 100% !important;
  background: transparent;
}

.main-content {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 24px 36px 48px;
}

/* ── Introduction ───────────────────────────────────────────────────────── */

.intro-section {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 36px;
  margin-bottom: 36px;
  width: 100%;
  min-height: var(--intro-logo-height);
}

.intro-box {
  flex: 1;
  min-width: 0;
  min-height: var(--intro-logo-height);
  height: auto;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  font-size: calc(var(--intro-logo-height) / 15.5);
  background: var(--pomco-surface);
  border: 1px solid var(--pomco-border);
  border-radius: var(--pomco-radius);
  padding: 2em 2em 1.2em;
  box-shadow: var(--pomco-shadow);
  overflow: visible;
}

.intro-title-row {
  display: block;
}

.intro-title {
  margin: 0 0 0.8em;
  font-size: 1.75em;
  font-weight: 800;
  line-height: 1.05;
  color: var(--pomco-navy);
  letter-spacing: 0.05em;
}

.intro-lpo-logo-link {
  display: inline-flex;
  flex-shrink: 0;
  line-height: 0;
  text-decoration: none;
}

.intro-lpo-logo-link-section {
  flex-shrink: 0;
}

.intro-lpo-logo-link-inline {
  display: none;
}

.intro-lpo-logo-inline {
  display: none;
}

.intro-subtitle {
  margin: 0 0 0.4em;
  font-size: 1.02em;
  font-weight: 600;
  color: var(--pomco-accent);
  line-height: 1.2;
}

.intro-text {
  margin: 0 0 1.5em;
  font-size: 0.9em;
  line-height: 1.38;
  color: var(--pomco-text);
}

.intro-text-secondary {
  margin-bottom: 0.75em;
  font-size: 0.86em;
  color: var(--pomco-muted);
  font-weight: 600;
}

.intro-lead {
  margin: 0;
  color: var(--pomco-muted);
  font-size: 0.82em;
  line-height: 1.32;
  padding-top: 1.5em;
  border-top: 1px solid var(--pomco-border);
  font-weight: 500;
}

.intro-logo {
  height: var(--intro-logo-height);
  width: auto;
  object-fit: contain;
  flex-shrink: 0;
}

.intro-pomco-logo {
  max-width: min(380px, 26vw);
  background: transparent;
}

.intro-lpo-logo {
  max-width: min(380px, 26vw);
  filter: drop-shadow(0 4px 12px rgba(26, 54, 93, 0.12));
}

@media (min-width: 993px) {
  .intro-lpo-logo-section {
    height: calc(var(--intro-logo-height) * 0.95);
    max-width: min(300px, 21vw);
  }
}

/* ── Cartes sections ──────────────────────────────────────────────────────── */

.app-card {
  background: var(--pomco-surface);
  border: 1px solid var(--pomco-border);
  border-radius: var(--pomco-radius);
  padding: 28px 32px 32px;
  margin-bottom: 28px;
  box-shadow: var(--pomco-shadow-sm);
}

.section-header {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 24px;
  padding-bottom: 18px;
  border-bottom: 2px solid var(--pomco-primary-light);
}

.section-header-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--pomco-primary) 0%, var(--pomco-navy) 100%);
  color: #fff;
  font-size: 1.15rem;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(30, 77, 123, 0.25);
}

.section-title {
  margin: 0 0 4px;
  font-size: 1.55rem;
  font-weight: 700;
  color: var(--pomco-navy);
  line-height: 1.25;
}

.section-subtitle {
  margin: 0;
  font-size: 1.05rem;
  color: var(--pomco-muted);
  line-height: 1.5;
}

/* ── Identification ───────────────────────────────────────────────────────── */

.identification-box {
  overflow: visible;
}

.structure-select-wrap {
  position: relative;
  z-index: 120;
}

.structure-select-wrap .selectize-control {
  position: relative;
  z-index: 120;
}

.structure-select-wrap .selectize-dropdown {
  z-index: 2000 !important;
}

.identification-lead {
  color: var(--pomco-muted);
  font-size: 1.05rem;
  margin-bottom: 20px;
}

.rgpd-box {
  background: var(--pomco-primary-light);
  border: 1px solid #c5d9eb;
  border-left: 4px solid var(--pomco-primary);
  border-radius: var(--pomco-radius-sm);
  padding: 18px 20px;
  margin: 20px 0;
}

.rgpd-box h4 {
  margin: 0 0 10px;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--pomco-navy);
}

.rgpd-box p {
  font-size: 0.98rem;
  line-height: 1.6;
  color: var(--pomco-text);
}

.identification-summary {
  background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 100%);
  border-color: #a7d9b5;
}

.identification-summary .section-header {
  border-bottom-color: #bbf7d0;
}

.identification-summary .section-header-icon {
  background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
}

.identification-email {
  color: var(--pomco-muted);
  font-size: 1rem;
  margin-top: 4px;
}

.identification-structure {
  color: var(--pomco-navy);
  font-size: 1rem;
  margin-top: 4px;
}



/* ── Sections du site ─────────────────────────────────────────────────────── */

.site-section {
  margin-bottom: 28px;
}

.site-section-main .section-header {
  margin-bottom: 24px;
}

.consult-accordion {
  border: 1px solid var(--pomco-border);
  border-radius: var(--pomco-radius);
  overflow: hidden;
  box-shadow: var(--pomco-shadow-sm);
  background: var(--pomco-surface);
}

.consult-accordion .accordion-button {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--pomco-navy);
  background: var(--pomco-surface-muted);
}

.consult-accordion .accordion-button:not(.collapsed) {
  color: var(--pomco-primary-dark);
  background: var(--pomco-primary-light);
  box-shadow: none;
}

.consultation-panel {
  padding-top: 4px;
}

.consultation-toolbar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.consultation-admin-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  background: var(--pomco-accent-light);
  border: 1px solid #c5d8c8;
  color: #2d4a32;
  font-size: 0.9rem;
  font-weight: 600;
}

.admin-login-lead {
  margin: 0 0 1rem;
  color: var(--pomco-muted);
  font-size: 0.95rem;
  line-height: 1.45;
}

.password-field-wrap {
  position: relative;
  margin-bottom: 0.25rem;
}

.password-field-wrap .shiny-input-container {
  margin-bottom: 0;
}

.password-field-wrap .form-control {
  padding-right: 2.75rem;
}

.password-toggle {
  position: absolute;
  right: 10px;
  bottom: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: calc(2.25rem + 2px);
  border: none;
  background: transparent;
  color: var(--pomco-muted);
  cursor: pointer;
  padding: 0;
  line-height: 1;
  z-index: 2;
}

.password-toggle:hover {
  color: var(--pomco-primary);
}

.consultation-help {
  color: var(--pomco-muted);
  font-size: 0.98rem;
  margin: 0 0 16px;
}

/* ── Page administrateur ──────────────────────────────────────────────────── */

.admin-page {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.admin-toolbar {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
}

.admin-species-stack {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.admin-species-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px 28px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.admin-species-header .section-header {
  flex: 1 1 320px;
  margin-bottom: 16px;
  min-width: 0;
}

.admin-species-search {
  flex: 0 1 340px;
  min-width: 220px;
  max-width: 420px;
  margin-top: 4px;
}

.admin-species-search .shiny-input-container {
  margin-bottom: 0;
  width: 100%;
}

.admin-species-search label {
  font-weight: 600;
  color: var(--pomco-navy);
  font-size: 0.92rem;
}

.admin-species-card-panel:has(.admin-species-awaiting-search) .admin-timeline-host {
  display: none !important;
}

.admin-species-map-card + .admin-species-map-card {
  margin-top: 8px;
}

.admin-timeline-host:empty {
  display: none;
}

.admin-timeline-slot {
  margin-top: 10px;
  width: 100%;
}

.admin-timeline-panel {
  margin: 10px 0 0;
  padding: 0;
  max-width: 100%;
  width: 100%;
}

.admin-timeline-host > .admin-timeline-panel {
  margin-top: 12px;
  padding: 0 4px;
}

.admin-timeline-controls {
  margin: 0;
  padding: 0;
  background: transparent;
  border: none;
  border-radius: 0;
  width: min(var(--admin-timeline-width, 100%), 100%);
  max-width: 100%;
}

.admin-timeline-label,
.admin-species-map-period-label {
  color: #111827;
  font-size: 0.98rem;
  font-weight: 700;
}

.admin-timeline-current-year,
.admin-species-map-period-year {
  color: #9ca3af;
  font-size: 1.15rem;
  font-weight: 500;
  margin-left: auto;
}

.admin-timeline-count,
.admin-timeline-range {
  display: none;
}

.admin-species-map-period-block {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.admin-species-map-period {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 0;
  width: 100%;
  max-width: 100%;
}

.admin-timeline-controls .shiny-input-container > label:empty {
  display: none;
}

.admin-timeline-controls .shiny-input-container {
  margin-bottom: 0;
  width: 100% !important;
  max-width: 100%;
}

.admin-timeline-controls .irs {
  width: 100%;
}

/* Curseur temporel — style maquette */
.admin-timeline-controls .irs--shiny {
  height: 48px;
}

.admin-timeline-controls .irs--shiny .irs-line {
  top: 18px;
  height: 4px;
  background: #f5c518;
  border: none;
  border-radius: 2px;
}

.admin-timeline-controls .irs--shiny .irs-bar {
  top: 18px;
  height: 4px;
  background: #f5c518;
  border: none;
  border-radius: 2px;
}

.admin-timeline-controls .irs--shiny .irs-single,
.admin-timeline-controls .irs--shiny .irs-min,
.admin-timeline-controls .irs--shiny .irs-max {
  display: none !important;
}

.admin-timeline-controls .irs--shiny .irs-handle {
  top: 11px;
  width: 18px;
  height: 18px;
  border: 2.5px solid #f5c518;
  background: #ffffff;
  border-radius: 50%;
  box-shadow: none;
  cursor: pointer;
}

.admin-timeline-controls .irs--shiny .irs-handle > i:first-child {
  display: none;
}

.admin-timeline-controls .irs--shiny .irs-handle.state_hover,
.admin-timeline-controls .irs--shiny .irs-handle:hover {
  background: #ffffff;
  border-color: #e0b000;
}

.admin-timeline-controls .irs--shiny .irs-grid {
  top: 28px;
  height: 22px;
}

.admin-timeline-controls .irs--shiny .irs-grid-pol {
  display: block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #e6b800;
  border: none;
  top: 2px;
  margin-left: -2px;
}

.admin-timeline-controls .irs--shiny .irs-grid-pol.small {
  display: none;
}

.admin-timeline-controls .irs--shiny .irs-grid-text {
  color: #9ca3af;
  font-size: 0.82rem;
  font-weight: 500;
  bottom: 0;
}

/* Points jaunes sur la piste (ticks) */
.admin-timeline-controls .irs--shiny .irs-line::before {
  content: none;
}

.admin-species-maps-grid {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.admin-species-map-card {
  background: #fff;
  border: 1px solid var(--pomco-border);
  border-radius: var(--pomco-radius-sm);
  padding: 20px 22px 18px;
}

.admin-species-map-card-title {
  margin: 0 0 16px;
  font-size: 1.08rem;
  font-weight: 700;
  color: var(--pomco-navy);
}

.admin-species-map-layout {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: 0;
  align-items: stretch;
}

.admin-species-map-panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
  padding-right: 24px;
}

.admin-species-map-container {
  height: 480px;
  width: 100%;
  background: #ffffff;
  border: none;
  border-radius: 0;
  overflow: hidden;
}

.admin-species-map-container .leaflet-container {
  background: #ffffff;
  font-family: inherit;
}

.admin-species-map-legend {
  padding: 4px 0 4px 28px;
  border: none;
  border-left: 1px solid #e5e7eb;
  border-radius: 0;
  background: transparent;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.admin-species-map-legend h5 {
  margin: 0 0 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid #e5e7eb;
  font-size: 1.05rem;
  font-weight: 700;
  color: #111827;
}

.admin-species-legend-caption,
.admin-species-legend-metric {
  margin: 0 0 4px;
  color: #4b5563;
  font-size: 0.92rem;
  line-height: 1.4;
}

.admin-species-legend-metric {
  margin-bottom: 14px;
  font-weight: 500;
  color: #374151;
}

.admin-species-legend-gradient-wrap {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 22px;
  max-width: 280px;
}

.admin-species-legend-gradient {
  width: 100%;
  height: 14px;
  border-radius: 3px;
  border: none;
  background: linear-gradient(90deg, #f0fffc 0%, #006149 100%);
}

.admin-species-legend-scale {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.admin-species-legend-min,
.admin-species-legend-max {
  font-size: 0.9rem;
  font-weight: 600;
  color: #111827;
}

.admin-species-legend-absent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: #4b5563;
  font-size: 0.9rem;
  line-height: 1.4;
  max-width: 280px;
}

.admin-species-legend-absent-swatch {
  width: 18px;
  height: 18px;
  border-radius: 3px;
  background: #d9d9d9;
  border: 1px solid #c4c4c4;
  flex-shrink: 0;
  margin-top: 1px;
}

.admin-data-filters {
  margin-bottom: 16px;
}

.admin-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--pomco-border);
  border-radius: var(--pomco-radius-sm);
}

.admin-data-table th,
.admin-data-table td {
  font-size: 0.88rem;
  vertical-align: top;
}

.admin-table-actions {
  white-space: nowrap;
  text-align: center;
  width: 1%;
}

.admin-edit-row-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  padding: 0.35rem 0.55rem !important;
}

.admin-edit-row-btn i {
  pointer-events: none;
}

.admin-edit-panel {
  margin-top: 22px;
  padding-top: 22px;
  border-top: 2px solid var(--pomco-primary-light);
}

.admin-edit-title {
  margin: 0 0 16px;
  color: var(--pomco-navy);
  font-size: 1.05rem;
}

.admin-edit-placeholder {
  margin-top: 18px;
}

.admin-edit-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.admin-biblio-readonly-list {
  margin-top: 8px;
}

.admin-biblio-readonly {
  padding: 10px 12px;
  margin-bottom: 8px;
  background: var(--pomco-surface-muted);
  border-radius: 8px;
  border: 1px solid var(--pomco-border);
}

.admin-biblio-readonly p {
  margin: 4px 0 0;
  color: var(--pomco-muted);
  font-size: 0.9rem;
}

.admin-biblio-url {
  word-break: break-all;
}

.consultation-mine-section {
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid var(--pomco-border);
}

.consultation-mine-title {
  margin: 0 0 8px;
  color: var(--pomco-navy);
  font-size: 1.15rem;
  font-weight: 700;
}

.consultation-mine-count {
  margin-bottom: 16px;
}

.consultation-detail-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.consultation-detail-card {
  padding: 16px 18px;
  background: #fff;
  border: 1px solid var(--pomco-border);
  border-radius: var(--pomco-radius-sm);
}

.consultation-detail-title {
  margin: 0 0 12px;
  color: var(--pomco-navy);
  font-size: 1.02rem;
  font-weight: 700;
}

.consultation-detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px 18px;
  margin: 0 0 14px;
}

.consultation-detail-field {
  margin: 0;
}

.consultation-detail-field dt {
  margin: 0 0 4px;
  color: var(--pomco-muted);
  font-size: 0.86rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.consultation-detail-field dd {
  margin: 0;
  color: var(--pomco-text);
  font-size: 0.98rem;
  line-height: 1.45;
  white-space: pre-wrap;
}

.consultation-biblio-list h5 {
  margin: 0 0 10px;
  color: var(--pomco-navy);
  font-size: 0.95rem;
  font-weight: 700;
}

.consultation-biblio-item {
  padding: 10px 12px;
  margin-bottom: 8px;
  background: var(--pomco-surface-muted);
  border-radius: var(--pomco-radius-sm);
}

.consultation-biblio-item:last-child {
  margin-bottom: 0;
}

.consultation-biblio-author {
  margin: 4px 0 0;
  color: var(--pomco-muted);
  font-size: 0.92rem;
}

.consultation-biblio-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-top: 8px;
  font-size: 0.9rem;
}

.consultation-biblio-links a {
  color: var(--pomco-primary);
  font-weight: 600;
  text-decoration: none;
}

.consultation-biblio-links a:hover {
  text-decoration: underline;
}

.consultation-biblio-empty {
  margin: 0;
  color: var(--pomco-muted);
  font-size: 0.92rem;
  font-style: italic;
}

.consultation-filters {
  margin-bottom: 18px;
}

.consultation-count {
  margin: 0 0 12px;
  color: var(--pomco-muted);
  font-size: 0.95rem;
  font-weight: 600;
}

.consultation-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--pomco-border);
  border-radius: var(--pomco-radius-sm);
  background: #fff;
}

.consultation-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.98rem;
}

.consultation-table thead th {
  text-align: left;
  padding: 12px 16px;
  background: var(--pomco-primary-light);
  color: var(--pomco-navy);
  font-weight: 700;
  border-bottom: 1px solid var(--pomco-border);
}

.consultation-table tbody td {
  padding: 11px 16px;
  border-bottom: 1px solid #e8eef4;
  vertical-align: top;
}

.consultation-table tbody tr:nth-child(even) {
  background: var(--pomco-surface-muted);
}

.consultation-table tbody tr:hover {
  background: #eef5fb;
}

.consultation-table tbody tr:last-child td {
  border-bottom: none;
}

/* ── Carte + formulaire (desktop) ─────────────────────────────────────────── */

.map-form-layout {
  display: flex;
  flex-direction: column;
  gap: 28px;
  margin-bottom: 28px;
}

@media (min-width: 992px) {
  .map-form-layout {
    flex-direction: row;
    align-items: flex-start;
  }

  .map-form-layout > * {
    flex: 1 1 0;
    min-width: 0;
  }

  .map-form-layout .app-card {
    margin-bottom: 0;
  }

  .map-form-layout .pomco-map-container {
    height: 700px;
  }
}

/* ── Carte ────────────────────────────────────────────────────────────────── */

.map-section {
  margin-bottom: 0;
}

.dept-select-wrap {
  margin-bottom: 16px;
  position: relative;
  z-index: 1200;
}

.dept-select-wrap .shiny-input-container {
  margin-bottom: 0;
}

.dept-select-wrap .selectize-control {
  position: relative;
  z-index: 1200;
}

.dept-select-wrap .selectize-dropdown {
  z-index: 1201 !important;
}

.pomco-map-container .leaflet-top.leaflet-left .leaflet-control-zoom {
  margin-top: 0;
}

.pomco-map-container .leaflet-control-container .leaflet-top,
.pomco-map-container .leaflet-control-container .leaflet-bottom {
  z-index: 500;
}

.pomco-map-container {
  height: 700px;
  width: 100%;
  border: 2px solid var(--pomco-border);
  border-radius: var(--pomco-radius-sm);
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.6);
}

/* Contour de focus Leaflet au clic sur un département */
.pomco-map-container .leaflet-interactive:focus,
.pomco-map-container .leaflet-interactive:focus-visible {
  outline: none;
}

.map-locked {
  text-align: center;
  color: var(--pomco-muted);
  padding: 48px 24px;
  background: var(--pomco-surface-muted);
  border-style: dashed;
}

.map-locked-icon {
  display: block;
  font-size: 2rem;
  color: var(--pomco-primary);
  margin-bottom: 12px;
  opacity: 0.7;
}

.map-locked p {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 500;
}

/* ── Formulaire ───────────────────────────────────────────────────────────── */

.saisie-form-panel {
  margin-bottom: 0;
}

.form-required-legend {
  margin: 0 0 16px;
  color: var(--pomco-muted);
  font-size: 0.92rem;
}

.dept-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--pomco-primary-light);
  color: var(--pomco-primary-dark);
  border: 1px solid #93b4d4;
  border-radius: 999px;
  padding: 8px 18px;
  margin-bottom: 20px;
  font-size: 1rem;
  font-weight: 600;
}

.form-placeholder {
  color: var(--pomco-muted);
  padding: 20px;
  text-align: center;
  font-size: 1.05rem;
  background: var(--pomco-surface-muted);
  border-radius: var(--pomco-radius-sm);
  border: 1px dashed var(--pomco-border);
}

.saisie-form-fields hr {
  margin: 24px 0;
  border: none;
  border-top: 1px solid var(--pomco-border);
}

.saisie-form-fields h4 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--pomco-navy);
  margin: 8px 0 12px;
}

.biblio-help {
  color: var(--pomco-muted);
  font-size: 0.98rem;
  margin-bottom: 12px;
}

.biblio-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.biblio-card {
  position: relative;
  border: 1px solid var(--pomco-border);
  border-radius: var(--pomco-radius-sm);
  padding: 20px 36px 20px 20px;
  background: var(--pomco-surface-muted);
}

.biblio-remove-wrap {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
}

.biblio-remove-wrap .shiny-input-container {
  margin: 0 !important;
  width: auto !important;
  max-width: none !important;
}

.biblio-card-title {
  margin: 0 0 14px;
  padding-right: 1.5rem;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--pomco-primary);
}

.biblio-remove-btn {
  width: 1.25rem !important;
  height: 1.25rem !important;
  min-width: 1.25rem !important;
  padding: 0 !important;
  border: none !important;
  border-radius: 4px !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  background: transparent !important;
  color: #dc2626 !important;
  box-shadow: none !important;
  font-size: 0.7rem !important;
  line-height: 1 !important;
}

.biblio-remove-btn:hover {
  background: #fef2f2 !important;
  color: #b91c1c !important;
}

.biblio-actions,
.form-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.form-actions {
  margin-top: 28px;
  padding-top: 22px;
  border-top: 2px solid var(--pomco-primary-light);
}

/* ── Champs Shiny / Bootstrap ─────────────────────────────────────────────── */

.main-content .form-label,
.main-content label.control-label {
  font-weight: 600;
  color: var(--pomco-navy);
  font-size: 0.98rem;
  margin-bottom: 6px;
}

.main-content .form-control,
.main-content .form-select,
.main-content .selectize-input {
  border-radius: 8px !important;
  border-color: var(--pomco-border) !important;
  font-size: 1rem;
  padding: 0.5rem 0.75rem;
  min-height: 42px;
}

.main-content .form-control:focus,
.main-content .form-select:focus {
  border-color: var(--pomco-primary) !important;
  box-shadow: 0 0 0 3px rgba(30, 77, 123, 0.15) !important;
}

.main-content .shiny-input-container {
  margin-bottom: 16px;
}

.shiny-input-container:not(.shiny-input-container-inline) {
  width: 100%;
  max-width: 100%;
}

.main-content .irs--shiny .irs-bar,
.main-content .irs--shiny .irs-single {
  background: var(--pomco-primary);
  border-color: var(--pomco-primary);
}

/* ── Boutons ──────────────────────────────────────────────────────────────── */

.btn-primary {
  background: linear-gradient(180deg, var(--pomco-primary) 0%, var(--pomco-primary-dark) 100%) !important;
  border-color: var(--pomco-primary-dark) !important;
  color: #fff !important;
  font-weight: 600 !important;
  padding: 0.55rem 1.25rem !important;
  border-radius: 8px !important;
  box-shadow: 0 2px 8px rgba(30, 77, 123, 0.25);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(30, 77, 123, 0.3);
}

.btn-secondary {
  background-color: #fff !important;
  border: 1px solid var(--pomco-border) !important;
  color: var(--pomco-navy) !important;
  font-weight: 600 !important;
  border-radius: 8px !important;
  padding: 0.5rem 1.1rem !important;
}

.btn-secondary:hover {
  background-color: var(--pomco-surface-muted) !important;
  border-color: #b8c9d9 !important;
}

.btn-small {
  padding: 0.4rem 0.9rem !important;
  font-size: 0.9rem !important;
}

/* ── Alertes ──────────────────────────────────────────────────────────────── */

.alert {
  border-radius: var(--pomco-radius-sm);
  padding: 14px 18px;
  margin-top: 16px;
  font-size: 1rem;
  font-weight: 500;
}

.alert-danger {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
}

.alert-success {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #166534;
}

/* ── Pied de page ─────────────────────────────────────────────────────────── */

.app-footer {
  margin-top: 40px;
  padding: 20px 0 8px;
  border-top: 1px solid var(--pomco-border);
  color: var(--pomco-muted);
  text-align: center;
  font-size: 0.92rem;
}

/* ── Responsive ───────────────────────────────────────────────────────────── */

@media (max-width: 992px) {
  :root {
    --intro-logo-height: 200px;
  }

  .main-content {
    padding: 20px 20px 36px;
  }

  .intro-section {
    flex-wrap: wrap;
    justify-content: center;
    height: auto;
    min-height: 0;
  }

  .intro-box {
    order: 2;
    flex-basis: 100%;
    height: auto;
    min-height: 0;
    font-size: 1rem;
    padding: 28px 24px;
    overflow: visible;
  }

  .intro-title {
    font-size: clamp(2rem, 4vw, 2.75rem);
    margin-bottom: 0.25em;
  }

  .intro-subtitle {
    font-size: clamp(1.15rem, 2vw, 1.5rem);
    margin-bottom: 0.6em;
  }

  .intro-text {
    font-size: clamp(1rem, 1.5vw, 1.15rem);
    line-height: 1.55;
    margin-bottom: 0.5em;
  }

  .intro-lead {
    font-size: clamp(0.95rem, 1.3vw, 1.05rem);
    line-height: 1.5;
    padding-top: 0.75em;
  }

  .intro-logo {
    height: var(--intro-logo-height);
    max-height: none;
  }

  .intro-pomco-logo {
    order: 1;
    max-width: 45vw;
  }

  .intro-lpo-logo-link-section {
    order: 3;
    max-width: 45vw;
  }

  .app-card {
    padding: 22px 20px 26px;
  }
}

@media (max-width: 768px) {
  :root {
    --intro-logo-height: 170px;
  }

  .main-content {
    padding: 16px 14px 32px;
  }

  .intro-section {
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
  }

  .intro-box {
    order: 2;
    height: auto;
    min-height: 0;
    overflow: visible;
  }

  .intro-pomco-logo {
    max-width: 100%;
    align-self: center;
    order: 1;
  }

  .intro-lpo-logo-link-section {
    display: none;
  }

  .intro-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 0.6em;
  }

  .intro-title {
    margin: 0;
    font-size: clamp(1rem, 4.2vw, 1.25rem);
    line-height: 1.15;
    letter-spacing: 0.03em;
    flex: 1;
    min-width: 0;
  }

  .intro-lpo-logo-link-inline {
    display: inline-flex;
  }

  .intro-lpo-logo-inline {
    display: block;
    height: 40px;
    width: auto;
    max-width: 72px;
    flex-shrink: 0;
    filter: drop-shadow(0 2px 6px rgba(26, 54, 93, 0.1));
  }

  .pomco-map-container {
    height: 480px;
  }

  .section-header {
    flex-direction: column;
    gap: 12px;
  }

  .identification-summary {
    flex-direction: column;
    align-items: flex-start;
  }

  .admin-species-header {
    flex-direction: column;
  }

  .admin-species-search {
    max-width: 100%;
    width: 100%;
    flex-basis: auto;
  }

  .admin-species-map-layout {
    grid-template-columns: 1fr;
  }

  .admin-species-map-panel {
    padding-right: 0;
  }

  .admin-species-map-legend {
    padding: 20px 0 0;
    border-left: none;
    border-top: 1px solid #e5e7eb;
  }

  .admin-species-map-container {
    height: 360px;
  }

  .admin-timeline-count {
    margin-left: 0;
    width: 100%;
  }
}
