/* ==========================================================================
   Commactis — Composants génériques du site
   ========================================================================== */

.site-container {
  width: min(
    calc(100% - (2 * var(--ds-spacing-4))),
    var(--site-content-max)
  );
  margin-inline: auto;
}

.skip-link {
  position: fixed;
  top: var(--ds-spacing-2);
  left: var(--ds-spacing-2);
  z-index: var(--ds-z-modal);
  padding: var(--ds-spacing-3) var(--ds-spacing-4);
  border-radius: var(--ds-radius-md);
  background: var(--ds-color-brand-navy);
  color: var(--ds-color-text-inverse);
  font-size: var(--ds-font-size-label);
  font-weight: var(--ds-font-weight-label);
  text-decoration: none;
  transform: translateY(-200%);
  transition: transform var(--ds-motion-duration-short) var(--ds-motion-easing-out);
}

.skip-link:focus {
  transform: translateY(0);
}

/* Buttons */
.ds-button {
  display: inline-flex;
  min-height: var(--ds-size-control-standard);
  align-items: center;
  justify-content: center;
  gap: var(--ds-spacing-2);
  padding: 0 var(--ds-spacing-5);
  border: 1px solid transparent;
  border-radius: var(--ds-radius-md);
  font-size: var(--ds-font-size-label);
  line-height: var(--ds-line-height-label);
  font-weight: var(--ds-font-weight-label);
  letter-spacing: var(--ds-letter-spacing-label);
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition:
    background-color var(--ds-motion-duration-short) var(--ds-motion-easing-standard),
    border-color var(--ds-motion-duration-short) var(--ds-motion-easing-standard),
    color var(--ds-motion-duration-short) var(--ds-motion-easing-standard),
    box-shadow var(--ds-motion-duration-short) var(--ds-motion-easing-standard),
    transform var(--ds-motion-duration-short) var(--ds-motion-easing-standard);
}

.ds-button:hover {
  transform: translateY(-1px);
}

.ds-button:active {
  transform: translateY(0);
}

.ds-button--large {
  min-height: var(--ds-size-control-large);
  padding-inline: var(--ds-spacing-6);
}

.ds-button--primary {
  background: var(--ds-color-action-primary);
  color: var(--ds-color-text-inverse);
  box-shadow: var(--ds-shadow-surface);
}

.ds-button--primary:hover {
  background: var(--ds-color-action-primary-hover);
}

.ds-button--primary:active {
  background: var(--ds-color-action-primary-active);
}

.ds-button--secondary {
  border-color: var(--ds-color-action-secondary-border);
  background: var(--ds-color-action-secondary-bg);
  color: var(--ds-color-action-secondary-text);
}

.ds-button--secondary:hover {
  border-color: var(--ds-color-neutral-400);
  background: var(--ds-color-neutral-50);
}

.ds-button--light {
  background: #ffffff;
  color: var(--ds-color-brand-navy);
}

.ds-button--light:hover {
  background: var(--ds-color-neutral-100);
}

/* Text links */
.ds-link {
  display: inline-flex;
  align-items: center;
  gap: var(--ds-spacing-2);
  color: var(--ds-color-brand-navy);
  font-size: var(--ds-font-size-label);
  font-weight: var(--ds-font-weight-label);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.25em;
}

.ds-link:hover {
  text-decoration-thickness: 2px;
}

.ds-link--inverse {
  color: var(--ds-color-text-inverse);
}

/* Reusable editorial elements */
.eyebrow {
  margin-bottom: var(--ds-spacing-3);
  color: var(--ds-color-brand-green);
  font-size: var(--ds-font-size-label);
  line-height: var(--ds-line-height-label);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.eyebrow--inverse {
  color: #a9cf75;
}

.section {
  padding-block: var(--ds-spacing-16);
  background: var(--ds-color-surface-default);
}

.section--light {
  background: var(--ds-color-neutral-50);
}

.section--soft {
  background: var(--ds-color-neutral-100);
}

.section--brand {
  background: var(--ds-color-brand-navy);
  color: var(--ds-color-text-inverse);
}

.section--contact {
  background: var(--ds-color-brand-green);
}

.section-intro {
  max-width: var(--site-reading-max);
  text-align: center;
}

.section-intro h2 {
  margin-bottom: var(--ds-spacing-5);
  color: var(--ds-color-brand-navy);
}

.section-intro p:last-child {
  margin-bottom: 0;
  color: var(--ds-color-text-secondary);
}

.section-heading {
  display: grid;
  gap: var(--ds-spacing-5);
  margin-bottom: var(--ds-spacing-8);
}

.section-heading h2 {
  margin-bottom: 0;
  color: var(--ds-color-brand-navy);
}

.section-heading__text {
  max-width: 36rem;
  margin-bottom: 0;
  color: var(--ds-color-text-secondary);
}

/* Cards */
.feature-grid {
  display: grid;
  gap: var(--ds-spacing-4);
}

.feature-card {
  padding: var(--ds-spacing-6);
  border: 1px solid var(--ds-color-border-default);
  border-radius: var(--ds-radius-lg);
  background: var(--ds-color-surface-raised);
  box-shadow: var(--ds-shadow-surface);
}

.feature-card h3 {
  margin-bottom: var(--ds-spacing-3);
  color: var(--ds-color-brand-navy);
}

.feature-card p {
  margin-bottom: 0;
  color: var(--ds-color-text-secondary);
}

.feature-card__icon {
  display: inline-grid;
  width: 2.75rem;
  height: 2.75rem;
  place-items: center;
  margin-bottom: var(--ds-spacing-5);
  border-radius: var(--ds-radius-full);
  background: rgb(114 161 52 / 14%);
  color: var(--ds-color-brand-navy);
  font-size: var(--ds-font-size-caption);
  font-weight: 700;
  letter-spacing: var(--ds-letter-spacing-caption);
}

.feature-card--wide {
  min-height: 100%;
}

/* Responsive grid */
@media (min-width: 40rem) {
  .site-container {
    width: min(
      calc(100% - (2 * var(--ds-spacing-6))),
      var(--site-content-max)
    );
  }

  .section-heading {
    grid-template-columns: minmax(0, 1fr) minmax(18rem, 0.7fr);
    align-items: end;
  }

  .feature-grid--2,
  .feature-grid--3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 64rem) {
  .site-container {
    width: min(
      calc(100% - (2 * var(--ds-spacing-8))),
      var(--site-content-max)
    );
  }

  .feature-grid--3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 90rem) {
  .site-container {
    width: min(
      calc(100% - (2 * var(--ds-spacing-10))),
      var(--site-content-max)
    );
  }
}
