:root {
  box-sizing: border-box;
}

/* Make padding/border part of element's width to prevent overflow */
*,
*::before,
*::after {
  box-sizing: inherit;
}

/* Extracted styles from index.html */
:root {
  --accent: #ffdb54;
  --accent-blue: #47b7ea;
  --text-dark: #0f172a;
  --muted: #64748b;
}

html,
body {
  height: 100%;
}

body {
  font-family: "Newsreader", "Inter", sans-serif;
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  margin: 0;
}

/* Navigation */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 16px;
  width: 100%;
  position: sticky;
  top: 0;
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(8px);
  z-index: 50;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-box {
  width: 40px;
  height: 40px;
  display: none;
}
@media (min-width: 640px) {
  .logo-box {
    display: block;
  }
}

.brand-title {
  font-size: 1.125rem;
  font-weight: 500;
  color: #1e293b;
}

.nav-links {
  display: flex;
  gap: 24px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--muted);
}

nav a {
  transition: all 0.3s ease-in-out;
  color: inherit;
  text-decoration: none;
}
/* hover removed */
nav a:hover {
  color: inherit;
  text-decoration: none;
}
/* Active nav link (same style as hover) */
nav a.active {
  color: #f97316;
  text-decoration: underline;
  text-underline-offset: 8px;
  font-weight: 800;
}

/* Home (formerly .hero) */
.home {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 120px 24px 48px;
  text-align: center;
  z-index: 10;
  background-image: url("./asset/homepage-carte.png");
  background-size: cover;
}

/* Prevent navbar from overlapping content when sticky */
main {
  padding-top: calc(4rem + 1px);
}

.home-title {
  font-size: 3rem;
  color: var(--text-dark);
  margin: 0 0 0.5rem 0;
}

.home-sub {
  font-style: italic;
  color: #475569;
  max-width: 720px;
  font-size: 18px;
  margin: 0 0 1.5rem 0;
}

.accent-bar {
  width: 96px;
  height: 6px;
  background: var(--accent);
  margin-bottom: 4rem;
  border-radius: 9999px;
}

/* Cards grid */
.cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  max-width: 64rem;
  width: 100%;
}
@media (min-width: 768px) {
  .cards {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Glass card */
.card {
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 20px;
  padding: 40px;
  box-shadow: 0 10px 30px rgba(2, 6, 23, 0.12);
  transition: all 0.3s ease;
  cursor: pointer;
}
.card:hover {
  transform: translateY(-8px);
  background: rgba(255, 255, 255, 0.98);
}

.icon-circle {
  width: 56px;
  height: 56px;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem auto;
}
.icon-circle.blue {
  background: #eff6ff;
  color: var(--accent-blue);
}
.icon-circle.yellow {
  background: #fffbeb;
  color: #d97706;
}

.card-title {
  font-size: 1.5rem;
  margin: 0 0 0.5rem 0;
  color: var(--text-dark);
}
.card:hover .card-title {
  color: var(--accent-blue);
}

.card-text {
  color: #475569;
  margin: 0 0 1.5rem 0;
  font-size: 14px;
  line-height: 1.6;
}

.card-link {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  display: inline-block;
  padding-bottom: 4px;
  border-bottom: 2px solid rgba(71, 183, 234, 0.3);
  color: var(--accent-blue);
  text-decoration: none;
}
.card-link.yellow {
  color: #d97706;
  border-bottom-color: rgba(249, 205, 115, 0.4);
}
.card-link:hover {
  border-bottom-color: currentColor;
}

/* small helpers */
.text-accent {
  color: var(--accent-blue);
}
.bg-accent {
  background-color: var(--accent);
}

/* Footer */
.site-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 32px;
  background: rgba(255, 255, 255, 0.6);
  font-size: 0.9rem;
}
.site-footer .footer-left,
.site-footer .footer-right {
  display: flex;
  gap: 16px;
  align-items: center;
}
.site-footer a {
  color: inherit;
  text-decoration: none;
}
.site-footer a:hover {
  text-decoration: underline;
}
.project-link {
  color: var(--accent-blue);
  font-weight: 600;
}
@media (max-width: 640px) {
  .site-footer {
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }
}
.about-section-title {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(
    90deg,
    rgba(97, 76, 0, 1) 0%,
    rgba(156, 115, 33, 1) 50%,
    rgba(212, 128, 44, 1) 100%
  );
  padding: 24px;
  margin-left: 24px;
  margin-right: 24px;
  border-radius: 24px;
  color: white;
}
.aboute-title-1 {
  display: inline-block;
  background-color: #ec5b13;

  padding: 8px 16px;
  border-radius: 9999px;
}
.about-section-content {
  display: flex;
  flex-direction: row;
  padding: 24px;
}
.about-section-content span {
  font-size: 24px;
  font-weight: bold;
  color: #ec5b13;
  margin-right: 24px;
}

/* Map page */
.carte-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 16px;
  height: calc(100vh - 64px);
  margin: 16px;
  align-items: stretch;
  overflow: hidden;
}

.filter-panel {
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 16px;
  padding: 16px;
  height: 100%;
  overflow-y: auto;
  box-shadow: 0 4px 18px rgba(15, 23, 42, 0.12);
}

.map-container {
  height: 100%;
}

.filter-panel h2 {
  margin: 0 0 12px;
  font-size: 1rem;
  color: #1e293b;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.filter-panel ul {
  list-style: none;
  margin: 0 0 20px;
  padding: 0;
}

.filter-item {
  width: 100%;
  background: #fff;
  border: 1px solid rgba(148, 163, 184, 0.4);
  border-radius: 999px;
  padding: 6px 10px;
  margin-bottom: 8px;
  text-align: left;
  font-weight: 600;
  font-size: 1rem;
  color: #334155;
  cursor: pointer;
}

.filter-item.active {
  border-color: #f97316;
  color: #f97316;
}

.map-switch {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border: 1px solid rgba(148, 163, 184, 0.4);
  border-radius: 999px;
  background: #f8fafc;
  overflow: hidden;
  margin-bottom: 16px;
}

.map-switch input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.map-switch label {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  padding: 6px 10px;
  cursor: pointer;
  color: #475569;
  font-weight: 700;
  font-size: 0.85rem;
  z-index: 2;
  user-select: none;
}

.map-switch-indicator {
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 4px;
  width: calc(50% - 8px);
  border-radius: 999px;
  background: #f97316;
  transition: transform 0.2s ease;
  box-shadow: 0 0 0 1px rgba(249, 115, 22, 0.24);
}

#switch-atlas:checked ~ label[for="switch-atlas"],
#switch-satellite:checked ~ label[for="switch-satellite"] {
  color: white;
}

#switch-satellite:checked ~ .map-switch-indicator {
  transform: translateX(100%);
}

#switch-atlas:checked ~ .map-switch-indicator {
  transform: translateX(0);
}

.filter-summary {
  background: #f8fafc;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 12px;
  padding: 12px;
  color: #334155;
}

.filter-summary strong {
  display: block;
  margin-bottom: 0.5rem;
  color: #1e293b;
}

.map-container {
  width: 100%;
  min-height: 70vh;
}

#map {
  width: 100%;
  height: 100%;
  min-height: 70vh;
  border-radius: 16px;
  overflow: hidden;
}

.leaflet-control-attribution {
  font-size: 11px;
}

.about-section-content div {
  flex: 1;
  margin: 0;
  padding: 0 12px;
  color: #334155;
  font-size: 20px;
  line-height: 1.5;
}
