/**
 * DSC Starter — Fondations.
 * Les variables utilisent les préréglages de theme.json afin de rester
 * modifiables depuis l'éditeur et les réglages globaux.
 */

:root {
  --dsc-primary: var(--wp--preset--color--primary, #17324d);
  --dsc-secondary: var(--wp--preset--color--secondary, #3f5f7a);
  --dsc-accent: var(--wp--preset--color--accent, #d65a31);
  --dsc-background: var(--wp--preset--color--background, #ffffff);
  --dsc-surface: var(--wp--preset--color--surface, #f4f7fa);
  --dsc-text: var(--wp--preset--color--text, #18212b);
  --dsc-muted: var(--wp--preset--color--muted, #5d6b78);
  --dsc-border: var(--wp--preset--color--border, #d9e1e8);
  --dsc-radius-sm: var(--wp--custom--dsc--radius--small, 8px);
  --dsc-radius-md: var(--wp--custom--dsc--radius--medium, 16px);
  --dsc-radius-lg: var(--wp--custom--dsc--radius--large, 28px);
  --dsc-radius-pill: var(--wp--custom--dsc--radius--pill, 999px);
  --dsc-shadow-sm: var(--wp--custom--dsc--shadow--small, 0 8px 24px rgba(24, 33, 43, 0.08));
  --dsc-shadow-md: var(--wp--custom--dsc--shadow--medium, 0 18px 50px rgba(24, 33, 43, 0.12));
  --dsc-section-space: var(--wp--custom--dsc--section-space, clamp(4rem, 8vw, 7rem));
  --dsc-transition: var(--wp--custom--dsc--transition, 180ms ease);
  --dsc-wide: var(--wp--style--global--wide-size, 1200px);
}

html {
  scroll-behavior: smooth;
}

body,
.editor-styles-wrapper {
  color: var(--dsc-text);
  background: var(--dsc-background);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body :where(p, li),
.editor-styles-wrapper :where(p, li) {
  text-wrap: pretty;
}

body :where(h1, h2, h3, h4, h5, h6),
.editor-styles-wrapper :where(h1, h2, h3, h4, h5, h6) {
  letter-spacing: -0.025em;
  text-wrap: balance;
}

body a,
.editor-styles-wrapper a {
  text-underline-offset: 0.18em;
  transition: color var(--dsc-transition), opacity var(--dsc-transition);
}

body a:hover,
body a:focus-visible,
.editor-styles-wrapper a:hover {
  color: var(--dsc-accent);
}

body :focus-visible {
  outline: 3px solid color-mix(in srgb, var(--dsc-accent) 55%, white);
  outline-offset: 3px;
}

.dsc-section {
  padding-top: var(--dsc-section-space);
  padding-bottom: var(--dsc-section-space);
}

.dsc-section--compact {
  padding-top: clamp(2.75rem, 5vw, 4.5rem);
  padding-bottom: clamp(2.75rem, 5vw, 4.5rem);
}

.dsc-section--surface {
  background: var(--dsc-surface);
}

.dsc-section--dark,
.wp-block-group.is-style-dsc-dark {
  color: #ffffff;
  background: var(--dsc-primary);
}

.dsc-section--dark :where(h1, h2, h3, h4, h5, h6, p, li),
.wp-block-group.is-style-dsc-dark :where(h1, h2, h3, h4, h5, h6, p, li) {
  color: inherit;
}

.wp-block-group.is-style-dsc-surface {
  padding: clamp(1.5rem, 3vw, 2.5rem);
  border: 1px solid var(--dsc-border);
  border-radius: var(--dsc-radius-md);
  background: var(--dsc-surface);
}

.dsc-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  color: var(--dsc-accent);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  line-height: 1.2;
  text-transform: uppercase;
}

.dsc-lead {
  max-width: 68ch;
  color: var(--dsc-muted);
  font-size: clamp(1.1rem, 1.5vw, 1.32rem);
  line-height: 1.65;
}

.dsc-measure {
  max-width: 68ch;
}

.dsc-muted {
  color: var(--dsc-muted);
}

.dsc-center {
  text-align: center;
}

.dsc-center .dsc-lead,
.dsc-center .dsc-measure {
  margin-inline: auto;
}

.wp-block-button__link {
  box-shadow: none;
  transition: transform var(--dsc-transition), box-shadow var(--dsc-transition), background-color var(--dsc-transition);
}

.wp-block-button__link:hover,
.wp-block-button__link:focus-visible {
  transform: translateY(-2px);
  box-shadow: var(--dsc-shadow-sm);
}

.wp-block-button.is-style-dsc-outline .wp-block-button__link {
  border: 1.5px solid currentColor;
  color: var(--dsc-primary);
  background: transparent;
}

.wp-block-button.is-style-dsc-outline .wp-block-button__link:hover,
.wp-block-button.is-style-dsc-outline .wp-block-button__link:focus-visible {
  color: #ffffff;
  border-color: var(--dsc-primary);
  background: var(--dsc-primary);
}

.wp-block-image.is-style-dsc-framed img {
  padding: 0.5rem;
  border: 1px solid var(--dsc-border);
  border-radius: var(--dsc-radius-md);
  background: var(--dsc-background);
  box-shadow: var(--dsc-shadow-sm);
}
