/* shared.css - Fondation commune aux deux pages */

/* === Reset & Base === */
* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: "Avenir Next", "Segoe UI", system-ui, -apple-system, sans-serif;
  background: #eef1f5;
  color: #1a1a2e;
  padding: 20px;
  margin: 0 auto;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* === Typography === */
h1 {
  text-align: center;
  margin-bottom: 4px;
  font-size: 1.5em;
  font-weight: 800;
  color: #1a365d;
  letter-spacing: -0.3px;
}
.subtitle {
  text-align: center;
  color: #64748b;
  margin-bottom: 18px;
  font-size: 0.92em;
  font-weight: 400;
}

/* === Navigation === */
.nav {
  text-align: center;
  margin-bottom: 16px;
  display: flex;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
}
.nav a, .nav button {
  color: #2d5fa1;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.82em;
  padding: 7px 14px;
  border-radius: 8px;
  background: white;
  box-shadow: 0 1px 2px rgba(0,0,0,0.06);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 1px solid #e2e8f0;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s ease;
}
.nav a:hover, .nav button:hover {
  background: #2d5fa1;
  color: white;
  border-color: #2d5fa1;
  box-shadow: 0 2px 8px rgba(45,95,161,0.25);
}
.nav button.active {
  background: #2d5fa1;
  color: white;
  border-color: #2d5fa1;
  box-shadow: 0 1px 4px rgba(45,95,161,0.2);
}

/* Nav grouping separator */
.nav-sep {
  width: 1px;
  height: 28px;
  background: #cbd5e0;
  align-self: center;
  margin: 0 4px;
}

/* Action buttons (exports, edit) - subtler style */
.nav button.nav-action {
  background: #f7fafc;
  color: #4a5568;
  border-color: #e2e8f0;
  font-weight: 500;
}
.nav button.nav-action:hover {
  background: #4a5568;
  color: white;
  border-color: #4a5568;
}
.nav button.nav-action.active {
  background: #27ae60;
  color: white;
  border-color: #27ae60;
}

/* === Status === */
.status {
  text-align: center;
  font-size: 0.88em;
  margin-bottom: 12px;
  min-height: 24px;
}
.status .saved { color: #27ae60; }
.status .saving { color: #d69e2e; }
.status .error { color: #c53030; font-weight: 600; }

/* === Utility === */
.hidden { display: none !important; }

/* === Form controls (selectors in views) === */
.view-controls {
  text-align: center;
  margin-bottom: 16px;
  padding: 12px 16px;
  background: white;
  border-radius: 10px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  border: 1px solid #e2e8f0;
  display: inline-flex;
  gap: 10px;
  align-items: center;
}
.view-controls label {
  font-weight: 600;
  color: #1a365d;
  font-size: 0.92em;
}
.view-controls select {
  padding: 8px 12px;
  border: 1px solid #cbd5e0;
  border-radius: 8px;
  font-size: 0.92em;
  font-family: inherit;
  color: #1a365d;
  background: #f7fafc;
  cursor: pointer;
}
.view-controls select:focus {
  outline: 2px solid #63b3ed;
  outline-offset: 1px;
}

/* === Toast === */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #1a365d;
  color: white;
  padding: 14px 24px;
  border-radius: 10px;
  font-size: 1em;
  font-weight: 600;
  opacity: 0;
  transition: opacity 0.3s;
  z-index: 100;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}
.toast.visible { opacity: 1; }

/* === Cards (shared pattern) === */
.card {
  background: white;
  border-radius: 10px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  border: 1px solid #e2e8f0;
  padding: 14px 16px;
  margin-bottom: 12px;
}
.card h3 {
  font-size: 0.95em;
  color: #1a365d;
  margin-bottom: 8px;
}

/* === Changelog === */
.btn-changelog {
  position: relative;
}
#changelog-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 8px;
  height: 8px;
  background: #e53e3e;
  border-radius: 50%;
  border: 1.5px solid white;
}
.changelog-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 200;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding-top: 60px;
  overflow-y: auto;
}
.changelog-panel {
  background: white;
  border-radius: 14px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.18);
  max-width: 520px;
  width: 90vw;
  max-height: 80vh;
  overflow-y: auto;
  animation: changelog-in 0.2s ease;
}
@keyframes changelog-in {
  from { opacity: 0; transform: translateY(-12px); }
  to { opacity: 1; transform: translateY(0); }
}
.changelog-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 22px 10px;
  border-bottom: 1px solid #e2e8f0;
  position: sticky;
  top: 0;
  background: white;
  border-radius: 14px 14px 0 0;
}
.changelog-header h2 {
  font-size: 1.15em;
  color: #1a365d;
  margin: 0;
}
.changelog-close {
  background: none;
  border: none;
  font-size: 1.6em;
  color: #64748b;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
}
.changelog-close:hover { color: #1a365d; }
.changelog-body {
  padding: 16px 22px 22px;
}
.changelog-release {
  margin-bottom: 20px;
}
.changelog-release:last-child { margin-bottom: 0; }
.changelog-version {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
}
.changelog-vtag {
  background: #2d5fa1;
  color: white;
  font-size: 0.75em;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 6px;
}
.changelog-date {
  font-size: 0.82em;
  color: #64748b;
}
.changelog-release h3 {
  font-size: 0.98em;
  color: #1a365d;
  margin-bottom: 6px;
}
.changelog-release ul {
  padding-left: 20px;
  margin: 0;
}
.changelog-release li {
  font-size: 0.88em;
  color: #334155;
  margin-bottom: 3px;
  line-height: 1.45;
}
