*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 16px; line-height: 1.5; color: #1a1a1a; background: #fff;
}

a { color: #D7001F; text-decoration: none; }
a:hover { text-decoration: underline; }

.ofp-topbar {
  background: #fff; border-bottom: 1px solid #ddd;
  padding: 8px 40px; display: flex; align-items: center; justify-content: space-between;
}
.ofp-topbar-brand { display: flex; align-items: center; gap: 12px; }
.ofp-cross {
  width: 32px; height: 32px; background: #D7001F; border-radius: 2px;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.ofp-confederation { font-size: 12px; color: #333; line-height: 1.4; }
.ofp-confederation span { display: block; color: #777; font-size: 11px; }
.ofp-langs { display: flex; gap: 16px; font-size: 12px; }
.ofp-langs a { color: #555; text-decoration: none; }
.ofp-langs a.active, .ofp-langs a:hover { color: #D7001F; border-bottom: 1px solid #D7001F; }

.ofp-header { padding: 16px 40px 0; background: #fff; }
.ofp-site-title { font-size: 22px; font-weight: 700; color: #000; letter-spacing: -0.3px; }
.ofp-site-subtitle { font-size: 12px; color: #777; margin-top: 4px; margin-bottom: 14px; }
.ofp-red-bar { height: 4px; background: #D7001F; }

.ofp-disclaimer {
  background: #faf8f0; border-left: 3px solid #D7001F;
  padding: 8px 40px; font-size: 12px; color: #555;
}
.ofp-alert {
  background: #fde8e8; border-left: 3px solid #D7001F;
  padding: 8px 40px; font-size: 12px; color: #A32D2D;
}

.ofp-nav { border-bottom: 1px solid #ddd; padding: 0 40px; background: #fff; }
.ofp-nav-links { display: flex; }
.ofp-nav-links a {
  display: block; padding: 10px 16px; font-size: 13px; color: #333;
  text-decoration: none; border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.ofp-nav-links a:hover { color: #D7001F; text-decoration: none; }
.ofp-nav-links a.active { color: #D7001F; border-bottom-color: #D7001F; font-weight: 500; }
.ofp-nav-toggle { display: none; background: none; border: none; font-size: 22px; color: #D7001F; cursor: pointer; padding: 10px 0; }

.ofp-body {
  display: grid; grid-template-columns: 2fr 1fr; gap: 40px;
  padding: 32px 40px; max-width: 1100px; margin: 0 auto;
}

.section-label {
  font-size: 10px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 1px; color: #999; margin-bottom: 16px;
  padding-bottom: 8px; border-bottom: 1px solid #eee;
}

.dossier-row { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid #f0f0f0; }
.dossier-row:last-child { border-bottom: none; }
.dossier-id {
  font-family: "Courier New", Courier, monospace; font-size: 16px;
  color: #D7001F; font-weight: 600; min-width: 70px; padding-top: 2px; flex-shrink: 0;
}
.dossier-title { font-size: 16px; font-weight: 700; color: #000; }
.dossier-title a { color: #000; text-decoration: none; }
.dossier-title a:hover { color: #D7001F; }
.dossier-meta { font-size: 12px; color: #888; margin-top: 3px; }

.badge {
  display: inline-block; font-size: 10px; font-weight: 600;
  padding: 2px 7px; border-radius: 2px; margin-left: 8px;
  vertical-align: middle; text-transform: uppercase; letter-spacing: 0.3px;
}
.badge-public { background: #e8f4e8; color: #2d6a2d; }
.badge-confidentiel { background: #fff3cd; color: #7a5500; }
.badge-restreint { background: #fde8e8; color: #A32D2D; }
.badge-secret { background: #1a1a1a; color: #fff; }

.ofp-sidebar { background: #f7f7f7; }
.sidebar-section { padding: 20px; border-bottom: 1px solid #e5e5e5; }
.sidebar-item { padding: 8px 0; border-bottom: 1px solid #eee; font-size: 13px; }
.sidebar-item:last-child { border-bottom: none; }
.sidebar-item-label { font-size: 10px; text-transform: uppercase; letter-spacing: 0.5px; color: #999; }
.sidebar-item-value { font-weight: 500; color: #000; margin-top: 2px; }
.sidebar-item-value.alert { color: #D7001F; }

.dossier-page { max-width: 780px; margin: 32px auto; padding: 0 40px 60px; }
.dossier-page-header { border-bottom: 1px solid #eee; margin-bottom: 24px; padding-bottom: 16px; }
.dossier-page-id { font-family: "Courier New", Courier, monospace; font-size: 13px; color: #D7001F; font-weight: 600; margin-bottom: 6px; }
.dossier-page-title { font-size: 24px; font-weight: 500; color: #000; margin-bottom: 8px; }
.dossier-page-meta { font-size: 12px; color: #888; margin-top: 8px; }
.dossier-page-meta span { margin-right: 16px; }

.dossier-content { font-size: 15px; line-height: 1.7; color: #1a1a1a; }
.dossier-content h2 {
  font-size: 24px; font-weight: 600; margin: 28px 0 10px;
  padding-bottom: 6px; border-bottom: 2px solid #eee;
  text-transform: uppercase; letter-spacing: 0.8px; color: #555;
}
.dossier-content h3 { font-size: 15px; font-weight: 600; margin: 20px 0 8px; }
.dossier-content p { margin-bottom: 16px; }
.dossier-content blockquote {
  border-left: 3px solid #D7001F; margin: 20px 0;
  padding: 10px 16px; background: #faf8f0; font-style: italic; color: #555;
}
.dossier-content table { width: 100%; border-collapse: collapse; font-size: 13px; margin: 20px 0; }
.dossier-content th {
  background: #f0f0f0; font-weight: 600; text-align: left;
  padding: 8px 12px; border: 1px solid #ddd;
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.5px;
}
.dossier-content td { padding: 8px 12px; border: 1px solid #eee; vertical-align: top; }
.dossier-content tr:nth-child(even) td { background: #fafafa; }

/* ── Dossier images ── */
.dossier-content img {
  display: block;
  max-width: 100%;
  margin: 24px auto;
  border: 1px solid #ddd;
  filter: grayscale(20%) contrast(1.05);
}

.dossier-content img + em {
  display: block;
  text-align: center;
  font-size: 11px;
  color: #999;
  font-style: normal;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-top: -16px;
  margin-bottom: 24px;
}

.dossier-content figure {
  margin: 24px 0;
  padding: 12px;
  background: #f7f7f7;
  border: 1px solid #ddd;
  border-left: 3px solid #D7001F;
}

.dossier-content figure img {
  margin: 0 auto 8px;
  border: none;
  filter: grayscale(20%) contrast(1.05);
}

.dossier-content figure figcaption {
  font-size: 11px;
  color: #999;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  text-align: center;
}

/* ── Personnel ── */
.personnel-page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 32px 40px 60px;
}

.personnel-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 24px;
}

.personnel-card {
  border: 1px solid #ddd;
  background: #fff;
  overflow: hidden;
}

.personnel-photo img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  display: block;
  filter: grayscale(20%);
}

.personnel-photo-placeholder {
  width: 100%;
  aspect-ratio: 1;
  background: #f0f0f0;
}

.personnel-info {
  padding: 12px;
  border-top: 1px solid #eee;
}

.personnel-name {
  font-size: 18px;
  font-weight: 700;
  color: #000;
}

.personnel-role {
  font-size: 12px;
  color: #888;
  margin-top: 2px;
}

.personnel-handle {
  font-family: "Courier New", Courier, monospace;
  font-size: 12px;
  color: #D7001F;
  margin-top: 6px;
}

.ofp-footer {
  background: #f0f0f0; border-top: 1px solid #ddd; padding: 14px 40px;
  font-size: 11px; color: #888; display: flex; justify-content: space-between; margin-top: 40px;
}

/* ── Incidents map ── */
.incidents-page { padding: 32px 40px 60px; max-width: 1100px; margin: 0 auto; }
.incidents-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.incidents-legend { display: flex; gap: 20px; font-size: 12px; color: #555; }
.legend-item { display: flex; align-items: center; gap: 6px; }
.legend-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; border: 2px solid #fff; box-shadow: 0 0 0 1px #ddd; }
.legend-dot.danger-extreme { background: #D7001F; }
.legend-dot.incident-signale { background: #E8A000; }
.legend-dot.evenement-inconnu { background: #666; }

#ofp-map { height: 580px; border: 1px solid #ddd; margin-top: 8px; }

.ofp-popup { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
.ofp-popup-id { font-family: "Courier New", monospace; font-size: 11px; color: #D7001F; font-weight: 600; margin-bottom: 4px; }
.ofp-popup-title { font-size: 13px; font-weight: 500; color: #000; margin-bottom: 6px; }
.ofp-popup-desc { font-size: 12px; color: #444; line-height: 1.5; margin-bottom: 8px; }
.ofp-popup-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ofp-popup-badge { font-size: 10px; font-weight: 600; padding: 2px 6px; border-radius: 2px; text-transform: uppercase; letter-spacing: 0.3px; }
.badge-danger-extreme { background: #fde8e8; color: #A32D2D; }
.badge-incident-signale { background: #fff3cd; color: #7a5500; }
.badge-evenement-inconnu { background: #f0f0f0; color: #555; }
.ofp-popup-coords { font-family: "Courier New", monospace; font-size: 10px; color: #aaa; }

.leaflet-control-attribution {
  font-size: 9px !important;
  opacity: 0.4;
  background: transparent !important;
  box-shadow: none !important;
}

/* ── Expandable sections ── */
.dossier-content details {
  border-left: 3px solid #D7001F;
  background: #faf8f0;
  margin: 20px 0;
  padding: 0;
}
.dossier-content details[open] {
  padding-bottom: 12px;
}
.dossier-content summary {
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 600;
  color: #D7001F;
  cursor: pointer;
  user-select: none;
  list-style: none;
  text-decoration: underline;
}
.dossier-content summary:hover {
  background: #fde8e8;
}
.dossier-content details[open] summary {
  border-bottom: 1px solid #eee;
  margin-bottom: 12px;
}
.dossier-content details p {
  padding: 0 16px;
  font-size: 13px;
  color: #555;
}
.dossier-content summary::before {
  content: "▶ ";
  font-size: 10px;
  vertical-align: middle;
  margin-right: 4px;
}
.dossier-content details[open] summary::before {
  content: "▼ ";
}

/* ── Mobile responsive ── */

@media (max-width: 768px) {
  .ofp-topbar, .ofp-header, .ofp-disclaimer, .ofp-alert { padding-left: 16px; padding-right: 16px; }
  .ofp-nav { padding: 0 16px; position: relative; }
  .ofp-nav-toggle { display: block; }
  .ofp-nav-links {
    display: none; flex-direction: column;
    position: absolute; top: 100%; left: 0; right: 0;
    background: #fff; border: 1px solid #ddd; border-top: none; z-index: 100;
  }
  .ofp-nav-links.open { display: flex; }
  .ofp-nav-links a { border-bottom: 1px solid #f0f0f0; }
  .ofp-body { grid-template-columns: 1fr; padding: 20px 16px; gap: 24px; }
  .dossier-page { padding: 0 16px 40px; }
  .incidents-page { padding: 20px 16px 40px; }
  .incidents-header { flex-direction: column; align-items: flex-start; gap: 10px; }
  .personnel-page { padding: 20px 16px 40px; }
  .personnel-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .dossier-page-meta { display: flex; flex-direction: column; gap: 6px; }
  .dossier-page-meta span { margin-right: 0; }
  .ofp-footer { flex-direction: column; gap: 4px; text-align: center; }
}

@media (max-width: 480px) {
  .personnel-grid { grid-template-columns: 1fr; }
  .ofp-site-title { font-size: 18px; }
}
