@import url("https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@300;400;500;700&display=swap");

:root {
  --bg: #f5f6f6;
  --card: #ffffff;
  --card-soft: rgba(255,255,255,0.94);
  --card-header: linear-gradient(180deg, #d2fff1 0%, #e5fff7 50%);
  --ink: #1e2430;
  --ink-soft: #5f6778;
  --line: #dde3ec;
  --teal: #1b515d;
  --rose: #e04e51;
  --yellow: #fdf097;
  --shadow-card: 0 10px 26px rgba(55, 72, 97, 0.12);
  --shadow-soft: 0 12px 30px rgba(55, 72, 97, 0.10);
}

:root {
  --accent: #64c4a5;
}

html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--ink); font-family: "JetBrains Mono", monospace; }
a { color: var(--rose); text-decoration: none; }
.page-shell { min-height: 100vh; display: flex; flex-direction: column; }
.app-header { position: sticky; top: 0; z-index: 1020; display: flex; align-items: center; gap: 18px; min-height: 40px; padding: 1px 10px; border-bottom: 1px solid rgba(67,69,75,.12); background: #9bffe0; }
.header-logo { height: 34px; object-fit: contain; filter: drop-shadow(0 6px 16px rgba(0,0,0,.18)); }
.header-ascii { position: absolute; left: 50%; transform: translateX(-50%); margin: 0; white-space: pre; font-family: "Courier New", monospace; font-size: 5px; line-height: 1.1; color: #1a505b; text-align: center; }
.header-mobile { display: none; font-weight: 700; letter-spacing: .18em; }
.app-main { padding: 18px 18px 28px; max-width: 1800px; width: 100%; margin: 0 auto; flex: 1; }

.hero-stack { display: grid; grid-template-columns: 1fr; gap: 14px; margin-bottom: 16px; }
.hero-first-row { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 14px; }
.hero-copy, .hero-aside { border: 1px solid rgba(27,81,93,.10); border-radius: 10px; background: #f9fafb; box-shadow: 0 6px 18px rgba(55, 72, 97, 0.08); }
.hero-copy--full { padding: 16px 18px; }
.hero-aside { padding: 10px; }
.hero-eyebrow, .section-eyebrow { font-size: .72rem; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; color: #1b515d; margin-bottom: 8px; }
.hero-title, .section-title { margin: 0; font-size: clamp(1.35rem, 2.05vw, 2.6rem); line-height: 1.1; }
.hero-text { max-width: 95ch; margin-top: 10px; color: #4b5563; font-size: clamp(1rem, 1.1vw, 1.5rem); }
.hero-copy .language-switch-wrap { margin-top: 14px; }
.language-switch-wrap { display: flex; align-items: center; gap: 12px; flex-wrap: nowrap; }
.language-switch-wrap .control-label { margin: 0 !important; white-space: nowrap; }
.switch-group { display: inline-flex !important; align-items: center !important; gap: 10px !important; flex-wrap: nowrap !important; }
.switch-side { display: inline-block !important; font-weight: 700; line-height: 1; white-space: nowrap; }
.hero-switch { margin: 0 !important; display: inline-flex !important; align-items: center !important; }
.hero-accordion { margin-top: 0; }
.hero-accordion .accordion-item { border-radius: 8px !important; overflow: hidden; border: 1px solid #cfd8e4; box-shadow: none; margin-bottom: 8px; background: #fff; }
.hero-accordion .accordion-button { border-radius: 8px !important; font-family: "JetBrains Mono", monospace; font-size: .95rem; font-weight: 700; background: #fff; color: #111827; min-height: 48px; }
.hero-accordion .accordion-button:not(.collapsed), .hero-accordion .accordion-button:hover { background-color: #f3f4f6; color: #111827; }
.hero-accordion .accordion-body { background: #ffffff; }

.panel-card { border: 1px solid var(--line); border-radius: 10px; background: var(--card); box-shadow: var(--shadow-card); overflow: visible; }
.panel-card .card-header { display: flex; align-items: center; min-height: 40px; padding: 5px 14px; border-bottom: 1px solid rgba(221,227,236,.7); background: var(--card-header); color: var(--ink); font-weight: 700; letter-spacing: .03em; }
.panel-card .card-body { padding: 12px; color: var(--ink); }
.card-header-label { display: flex; align-items: center; gap: 8px; }
.helper-text { color: var(--ink-soft); font-size: .84rem; line-height: 1.45; }

.status-box { margin-top: 12px; padding: 10px 12px; border: 1px dashed var(--line); border-radius: 10px; color: var(--ink-soft); background: #fff; }
.status-title { margin-bottom: 8px; color: var(--ink); font-weight: 700; }
.status-details { display: grid; gap: 6px; font-size: .78rem; }
.status-details > div { display: flex; justify-content: space-between; gap: 12px; border-top: 1px solid rgba(221,227,236,.7); padding-top: 6px; }
.status-details span { color: var(--ink-soft); }
.status-details strong { color: var(--ink); font-weight: 700; text-align: right; }

.load-grid { display: grid; grid-template-columns: minmax(260px, .8fr) minmax(420px, 1.4fr) minmax(260px, .8fr); gap: 14px; align-items: stretch; }
.load-help, .map-wrap, .upload-wrap { border: 1px solid var(--line); border-radius: 12px; padding: 10px; background: rgba(255,255,255,.92); }
.control-section-title, .control-label { margin-bottom: 10px; font-size: .76rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft); }
.upload-zone { display: grid; place-items: center; min-height: 460px; border: 1px dashed #d9e2f0; border-radius: 10px; background: #fff; color: var(--ink-soft); text-align: center; padding: 12px; cursor: pointer; }
.upload-zone:hover { border-color: var(--teal); }
.filters-grid { display: grid; grid-template-columns: 1.6fr repeat(5, minmax(140px, 1fr)); gap: 12px; align-items: end; }
.tool-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 0 14px; margin-top: 3px; border: 1px solid #d9e2f0 !important; border-radius: 5px !important; background: #fff !important; color: var(--rose) !important; font-weight: 600 !important; box-shadow: none !important; transition: background-color .15s ease, border-color .15s ease, color .15s ease, box-shadow .15s ease, transform .15s ease; }
.tool-btn:hover { background: #fff5f5 !important; border-color: #efc5c8 !important; color: #c53f44 !important; box-shadow: 0 4px 12px rgba(224, 78, 81, 0.12) !important; transform: translateY(-1px); }
.tool-btn:focus-visible { outline: none !important; border-color: #d97e83 !important; box-shadow: 0 0 0 3px rgba(224, 78, 81, 0.18) !important; }
.form-check-input:checked {
  background-color: var(--accent) !important;
  border-color: var(--accent) !important;
}
.form-check-input:focus {
  border-color: #7fb8a6 !important;
  box-shadow: 0 0 0 0.2rem rgba(76, 124, 109, 0.25) !important;
}

.main-tabs { margin-top: 10px; display: flex; gap: 8px; }
.main-tabs .tab {
  border: 1px solid #b7d8ce;
  background: #f7fffc;
  color: #1b515d;
  border-radius: 10px;
  padding: 13px 20px;
  min-height: 52px;
  font-family: "JetBrains Mono", monospace;
  font-size: 1rem;
  font-weight: 700;
  transition: all .15s ease;
}
.main-tabs .tab:hover { background: #bdf2df; color: #123c44; }
.main-tabs .tab--selected {
  background: #91eed1 !important;
  color: #123c44 !important;
  border-color: #66c9ad !important;
  box-shadow: 0 6px 16px rgba(27,81,93,.16);
  transform: translateY(-1px);
}
.tabs-pane-content { padding-top: 14px; }


.plot-graph { min-height: 360px; }
.plot-caption { display: block; width: 90%; max-width: 90%; margin: 4px 6px 0; color: var(--ink-soft); font-size: .78rem; line-height: 1.4; word-wrap: break-word; overflow-wrap: anywhere; white-space: normal; }
.plot-summary-list { margin: 0.35rem 0 0; padding-left: 0.4rem; color: var(--ink-soft); font-size: .78rem; line-height: 1.6; display: flex; flex-direction: column; gap: 0.15rem; }
.plot-summary-title { font-weight: 700; margin-bottom: 0.2rem; }
.plot-summary-line { display: block; width: 100%; margin: 0; padding-left: 0.8rem; text-indent: -0.8rem; white-space: normal; word-break: break-word; overflow-wrap: anywhere; }
.plot-summary-line, .plot-caption { max-width: 100%; }
.comfort-progress-bar {
  height: 8px;
  max-width: 420px;
  background-color: rgba(221, 227, 236, .75) !important;
}
.comfort-progress-bar .progress-bar {
  background-color: var(--accent) !important;
}

#solar-monthly-radiation,
#solar-heliodon,
#solar-typical-days,
#solar-ghi-heatmap {
  overflow: visible;
}

.wind-season-card { border: 1px solid var(--line); border-radius: 10px; overflow: visible; background: #fff; }
.wind-season-card .card-header { min-height: 44px; padding: 9px 12px; border-bottom: 1px solid rgba(221,227,236,.75); color: var(--ink); font-weight: 800; letter-spacing: .04em; }
.wind-season-card .card-body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 6px; }
.wind-season-printemps .card-header { background: linear-gradient(180deg, rgba(145,238,209,.9) 0%, rgba(255,255,255,.95) 100%); }
.wind-season-ete .card-header { background: linear-gradient(180deg, rgba(253,240,151,.95) 0%, rgba(255,255,255,.95) 100%); }
.wind-season-automne .card-header { background: linear-gradient(180deg, rgba(158,114,102,.55) 0%, rgba(255,255,255,.95) 100%); }
.wind-season-hiver .card-header { background: linear-gradient(180deg, rgba(149,226,245,.75) 0%, rgba(255,255,255,.95) 100%); }
.wind-period-title { margin: 0 0 4px; font-weight: 800; font-size: .82rem; color: var(--ink); }
.wind-season-graph { min-height: 280px; overflow: visible; }
.wind-season-separator { margin: 8px 0; border-color: rgba(30,36,48,.22); opacity: 1; }

.comfort-subcard .card-header { background: linear-gradient(180deg, rgba(145,238,209,.38) 0%, rgba(255,255,255,.98) 100%); padding-top:1px; padding-bottom:2px; padding-right:5px; }
.comfort-subcard .card-header span { font-weight: 700; }
.comfort-scenario-icon { height: 75px; object-fit: contain; opacity: 1; }

.footer-geek { font-family: "JetBrains Mono", monospace; margin-top: auto; padding: 18px 10px; font-size: .85rem; color: #9d9d9c; text-align: center; letter-spacing: .04em; }
@keyframes heart-pulse-arep { 0% { color: #e04e51; } 25% { color: #50808f; } 50% { color: #fdf392; } 75% { color: #1b515d; } 100% { color: #e04e51; } }
.footer-heart { display: inline-block; font-weight: 600; animation: heart-pulse-arep 6s ease-in-out infinite; }

@media (max-width: 1200px) { .load-grid { grid-template-columns: 1fr; } .filters-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .header-ascii { display: none; } .hero-first-row { grid-template-columns: 1fr; } }
@media (max-width: 768px) { .app-main { padding: 14px 10px 22px; } .header-mobile { display: block; } .filters-grid { grid-template-columns: 1fr; } .main-tabs { flex-wrap: wrap; } .upload-zone { min-height: 180px; } }
