/* WALP — accueil coloré sur une base bleu nuit professionnelle. */

.ds-main:has(.ds-home) {
  min-height: calc(100vh - 12rem);
  background:
    radial-gradient(circle at 88% 82%, rgba(37, 99, 235, 0.17), transparent 28rem),
    linear-gradient(145deg, #111a31 0%, #172642 52%, #142038 100%);
}

.ds-home {
  max-width: var(--content-width-wide);
  margin: 0 auto;
  padding: clamp(1rem, 2vw, 1.5rem);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.055);
  box-shadow: 0 24px 60px rgba(7, 13, 28, 0.2);
  backdrop-filter: blur(8px);
}

.ds-home__matieres {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(0.9rem, 1.7vw, 1.25rem);
}

.ds-home__subjects {
  position: relative;
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(0.9rem, 1.7vw, 1.25rem);
}


.ds-home__matiere {
  position: relative;
  overflow: hidden;
  display: flex;
  min-height: 7.25rem;
  flex-direction: column;
  justify-content: center;
  padding: var(--space-lg);
  background:
    linear-gradient(
      135deg,
      color-mix(in srgb, var(--accent) 15%, #ffffff) 0%,
      #ffffff 72%
    );
  border: 1px solid color-mix(in srgb, var(--accent) 52%, #ffffff);
  border-top: 5px solid var(--accent);
  border-radius: 16px;
  color: var(--color-text);
  text-decoration: none;
  box-shadow: 0 12px 28px rgba(7, 13, 28, 0.16);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.ds-home__matiere::after {
  content: "";
  position: absolute;
  right: -2.5rem;
  bottom: -3.5rem;
  width: 9rem;
  height: 9rem;
  border-radius: 50%;
  background: color-mix(in srgb, var(--accent) 13%, transparent);
  pointer-events: none;
}

.ds-home__matiere:hover,
.ds-home__matiere:focus-visible {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: 0 18px 36px rgba(7, 13, 28, 0.24);
}

.ds-home__matiere:focus-visible {
  outline: 3px solid #ffffff;
  outline-offset: 3px;
}

.ds-home__matiere h2 {
  position: relative;
  z-index: 1;
  margin: 0 0 var(--space-xs);
  font-family: var(--font-titre);
  font-size: var(--font-size-lg);
  color: color-mix(in srgb, var(--accent) 78%, #111827);
}

.ds-home__matiere span {
  position: relative;
  z-index: 1;
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
}

.ds-home__agenda {
  grid-column: 1 / -1;
  border-color: #c99a00;
  background:
    linear-gradient(
      135deg,
      color-mix(in srgb, var(--accent) 15%, #ffffff) 0%,
      #ffffff 72%
    );
}

.ds-home__agenda h2 {
  color: #5d4900;
}

.ds-home__agenda span {
  color: #554711;
}

.ds-home__weekly {
  grid-column: 1 / -1;
}

@media (max-width: 620px) {
  .ds-home__matieres {
    grid-template-columns: 1fr;
  }

  .ds-home__agenda {
    grid-column: 1;
  }

  .ds-home__subjects {
    grid-template-columns: 1fr;
  }

  .ds-home {
    padding: var(--space-md);
    border-radius: 16px;
  }
}
