/* Styles spécifiques à index.html */
.home-shell {
  width: min(calc(100vw - 96px), 1340px);
  min-height: calc(100vh - 64px);
  min-height: calc(100svh - 64px);
  margin: 0 auto;
  padding: 68px 22px 22px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  align-content: stretch;
  justify-items: center;
  gap: 18px;
  text-align: center;
}

body {
  background:
    linear-gradient(180deg, #eef5f1 0, #f7fbf8 calc(100svh - 260px), #fff calc(100svh - 64px), #fff 100%);
}

.home-hero {
  width: 100%;
  margin: 0 auto;
  display: grid;
  justify-items: center;
  gap: 18px;
  text-align: center;
}

.home-hero-icon {
  width: 118px;
  height: 118px;
  border: 1px solid var(--accent);
  border-radius: 22px;
  display: grid;
  place-items: center;
  background: var(--accent);
  color: #fff;
  box-shadow: 0 18px 50px rgba(36, 48, 41, 0.10);
}

.home-hero-icon svg {
  width: 76px;
  height: 76px;
  stroke-width: 1.7;
}

.home-hero h1 {
  max-width: 1040px;
  margin: 0 0 10px;
  color: var(--ink);
  font-size: clamp(2.24rem, 4.45vw, 4.55rem);
  line-height: 1.02;
  font-weight: 600;
  letter-spacing: -0.035em;
}

.home-hero p {
  max-width: 1040px;
  margin: 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.25vw, 1.16rem);
  line-height: 1.55;
}

.home-kpi-zone {
  width: 100%;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.home-kpis {
  width: min(100%, 680px);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  justify-content: center;
}

.home-kpi-card {
  min-width: 0;
  min-height: 128px;
  padding: 20px 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 10px;
  background: var(--panel);
  text-align: center;
}

.home-kpi-card:first-child {
  background: var(--panel);
}

.home-kpi-card:nth-child(2) {
  border-color: #23785f;
  background: #23785f;
}

.home-kpi-card span {
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.2;
  font-weight: 500;
}

.home-kpi-card:nth-child(2) span,
.home-kpi-card:nth-child(2) strong {
  color: #fff;
}

.home-kpi-label-short {
  display: none;
}

.home-kpi-card strong {
  color: var(--ink);
  font-size: clamp(2rem, 3vw, 3rem);
  line-height: 1;
  font-weight: 600;
}

.home-tools,
.home-charts {
  background: #fff;
}

.home-tools {
  padding: 36px 0;
}

.home-charts {
  padding: 36px 0 108px;
}

.home-tools-inner,
.home-charts-section-inner {
  width: min(calc(100vw - 96px), 1340px);
  margin: 0 auto;
  padding: 0 22px;
  display: grid;
  justify-items: center;
  gap: 72px;
  text-align: center;
}

.home-tools-heading,
.home-charts-heading {
  display: grid;
  justify-items: center;
  gap: 12px;
  margin: 0;
  text-align: center;
}

.home-tools-heading-icon,
.home-charts-heading-icon {
  width: 82px;
  height: 82px;
  border: 0;
  border-radius: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: var(--accent);
}

.home-tools-heading-icon svg,
.home-charts-heading-icon svg {
  width: 52px;
  height: 52px;
}

.home-tools-heading h2,
.home-charts-heading h2 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(1.55rem, 2.4vw, 2.25rem);
  line-height: 1.08;
  font-weight: 600;
}

.home-tools-heading p,
.home-charts-heading p {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
  font-size: clamp(1.03rem, 1.2vw, 1.18rem);
  line-height: 1.5;
}

.home-tools-list {
  width: 100%;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
  justify-content: center;
  gap: 12px;
}

.home-tool-card {
  position: relative;
  min-width: 0;
  min-height: 176px;
  padding: 28px 24px;
  border: 0;
  border-radius: 0;
  display: grid;
  grid-template-columns: 1fr;
  align-content: start;
  justify-items: center;
  gap: 18px;
  background: transparent;
  color: inherit;
  text-align: center;
  text-decoration: none;
}

.home-tool-card + .home-tool-card::before {
  content: "";
  position: absolute;
  left: -6px;
  top: 18px;
  bottom: 18px;
  width: 1px;
  background: var(--line);
}

.home-tool-card:hover,
.home-tool-card:focus-visible {
  background: transparent;
  box-shadow: none;
  outline: 0;
}

.home-tool-card-disabled {
  cursor: not-allowed;
  color: var(--muted);
  opacity: 0.58;
}

.home-tool-card-disabled:hover,
.home-tool-card-disabled:focus-visible {
  background: transparent;
  box-shadow: none;
}

.home-tool-icon {
  width: auto;
  height: auto;
  border: 0;
  border-radius: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: var(--accent);
}

.home-tool-icon svg {
  width: 46px;
  height: 46px;
}

.home-tool-content {
  min-width: 0;
  display: grid;
  justify-items: center;
  gap: 9px;
}

.home-tool-content strong {
  color: var(--ink);
  font-size: 1.12rem;
  line-height: 1.2;
  font-weight: 600;
  text-align: center;
}

.home-tool-content span {
  max-width: 300px;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.45;
  text-align: center;
}

.home-charts-inner {
  width: 100%;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 1px minmax(0, 1fr);
  gap: 34px;
  align-items: stretch;
  justify-content: center;
}

.home-charts-inner::before {
  content: "";
  grid-column: 2;
  grid-row: 1;
  width: 1px;
  min-height: 360px;
  background: var(--line);
}

.home-chart-card {
  min-width: 0;
  padding: 0;
  display: grid;
  gap: 18px;
}

.home-chart-card:first-of-type {
  grid-column: 1;
}

.home-chart-card:last-of-type {
  grid-column: 3;
}

.home-chart-card header {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.home-chart-card h3 {
  margin: 0;
  color: var(--ink);
  font-size: 1.12rem;
  line-height: 1.2;
  font-weight: 600;
}

.home-chart {
  width: 100%;
  height: 340px;
  min-height: 0;
}

.home-charts + .site-footer {
  margin-top: 0;
}

@media (max-width: 1023px) {
  .home-shell {
    width: calc(100% - 38px);
    min-height: auto;
    grid-template-rows: auto auto;
    align-content: start;
    padding: 48px 0;
  }

  .home-hero {
    justify-items: center;
    text-align: center;
  }

  .home-kpi-zone {
    align-items: start;
  }

  .home-tools {
    padding: 28px 0;
  }

  .home-charts {
    padding: 28px 0 84px;
  }

  .home-tools-inner,
  .home-charts-section-inner {
    width: calc(100% - 38px);
    padding-left: 0;
    padding-right: 0;
    gap: 48px;
  }

  .home-tools-list,
  .home-charts-inner {
    width: min(100%, 680px);
    grid-template-columns: 1fr;
  }

  .home-tool-card + .home-tool-card::before {
    left: 24px;
    right: 24px;
    top: -6px;
    bottom: auto;
    width: auto;
    height: 1px;
  }

  .home-charts-inner::before {
    display: none;
  }

  .home-chart-card:first-of-type,
  .home-chart-card:last-of-type {
    grid-column: 1;
  }
}

@media (max-width: 640px) {
  .home-shell,
  .home-tools-inner,
  .home-charts-section-inner {
    width: calc(100% - 34px);
  }

  .home-hero {
    justify-items: center;
    text-align: center;
  }

  .home-hero-icon {
    display: none;
  }

  .home-kpis {
    width: 100%;
    margin-top: 10px;
    grid-template-columns: 1fr;
  }

  .home-kpi-card {
    min-height: 82px;
    padding: 10px 12px;
    gap: 6px;
  }

  .home-kpi-label-full {
    display: inline;
  }

  .home-kpi-label-short {
    display: none;
  }

  .home-charts {
    padding-top: 42px;
    padding-bottom: 38px;
  }

  .home-chart {
    height: 300px;
  }
}
