/**
 * DSC Starter — Composants réutilisables par les patterns Gutenberg.
 */

.dsc-hero {
  position: relative;
  overflow: clip;
  background:
    radial-gradient(circle at 82% 12%, rgba(214, 90, 49, 0.14), transparent 28rem),
    linear-gradient(180deg, var(--dsc-background), var(--dsc-surface));
}

.dsc-hero::after {
  position: absolute;
  inset: auto -8rem -10rem auto;
  width: 26rem;
  height: 26rem;
  border: 1px solid rgba(23, 50, 77, 0.1);
  border-radius: 50%;
  content: "";
  pointer-events: none;
}

.dsc-hero__content {
  position: relative;
  z-index: 1;
}

.dsc-hero__visual {
  min-height: 380px;
  padding: clamp(1.5rem, 4vw, 3rem);
  border: 1px solid var(--dsc-border);
  border-radius: var(--dsc-radius-lg);
  background: var(--dsc-background);
  box-shadow: var(--dsc-shadow-md);
}

.dsc-hero__visual .wp-block-group {
  height: 100%;
}

.dsc-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1.25rem;
}

.dsc-chip {
  display: inline-flex;
  align-items: center;
  min-height: 2.25rem;
  padding: 0.45rem 0.85rem;
  border: 1px solid var(--dsc-border);
  border-radius: var(--dsc-radius-pill);
  color: var(--dsc-secondary);
  background: rgba(255, 255, 255, 0.75);
  font-size: 0.9rem;
  font-weight: 700;
}

.dsc-card-grid {
  align-items: stretch;
}

.dsc-card {
  height: 100%;
  padding: clamp(1.4rem, 3vw, 2rem);
  border: 1px solid var(--dsc-border);
  border-radius: var(--dsc-radius-md);
  background: var(--dsc-background);
  box-shadow: 0 1px 0 rgba(24, 33, 43, 0.02);
  transition: transform var(--dsc-transition), box-shadow var(--dsc-transition), border-color var(--dsc-transition);
}

.dsc-card:hover {
  border-color: color-mix(in srgb, var(--dsc-accent) 36%, var(--dsc-border));
  transform: translateY(-4px);
  box-shadow: var(--dsc-shadow-sm);
}

.dsc-card__number,
.dsc-step__number {
  display: grid;
  width: 2.6rem;
  height: 2.6rem;
  margin-bottom: 1.1rem;
  place-items: center;
  border-radius: 50%;
  color: #ffffff;
  background: var(--dsc-primary);
  font-size: 0.95rem;
  font-weight: 800;
}

.dsc-proof-bar {
  padding: clamp(1.4rem, 3vw, 2rem);
  border: 1px solid var(--dsc-border);
  border-radius: var(--dsc-radius-md);
  background: var(--dsc-background);
  box-shadow: var(--dsc-shadow-sm);
}

.dsc-proof-item {
  min-width: 0;
}

.dsc-proof-item strong {
  display: block;
  margin-bottom: 0.15rem;
  color: var(--dsc-primary);
  font-size: clamp(1.15rem, 2vw, 1.5rem);
}

.dsc-stats {
  overflow: hidden;
  border: 1px solid var(--dsc-border);
  border-radius: var(--dsc-radius-lg);
  background: var(--dsc-primary);
}

.dsc-stat {
  padding: clamp(1.5rem, 4vw, 2.5rem);
  color: #ffffff;
}

.dsc-stat + .dsc-stat {
  border-left: 1px solid rgba(255, 255, 255, 0.2);
}

.dsc-stat__value {
  margin-bottom: 0.25rem;
  color: #ffffff;
  font-size: clamp(2rem, 5vw, 3.6rem);
  font-weight: 800;
  line-height: 1;
}

.dsc-stat__label {
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.95rem;
}

.dsc-steps {
  counter-reset: dsc-step;
}

.dsc-step {
  position: relative;
  height: 100%;
  padding: clamp(1.4rem, 3vw, 2rem);
  border-top: 3px solid var(--dsc-accent);
  background: var(--dsc-background);
}

.dsc-testimonial {
  padding: clamp(2rem, 5vw, 4rem);
  border: 1px solid var(--dsc-border);
  border-radius: var(--dsc-radius-lg);
  background: var(--dsc-background);
  box-shadow: var(--dsc-shadow-sm);
}

.dsc-testimonial blockquote {
  margin: 0;
}

.dsc-testimonial__quote {
  color: var(--dsc-text);
  font-size: clamp(1.35rem, 2.6vw, 2.05rem);
  font-weight: 650;
  line-height: 1.45;
}

.dsc-testimonial__author {
  margin-top: 1.5rem;
  color: var(--dsc-muted);
}

.dsc-faq .wp-block-details {
  margin: 0;
  padding: 1.1rem 1.25rem;
  border: 1px solid var(--dsc-border);
  border-radius: var(--dsc-radius-sm);
  background: var(--dsc-background);
}

.dsc-faq .wp-block-details + .wp-block-details {
  margin-top: 0.85rem;
}

.dsc-faq summary {
  cursor: pointer;
  color: var(--dsc-text);
  font-weight: 750;
}

.dsc-faq summary + * {
  margin-top: 0.85rem;
}

.dsc-cta {
  position: relative;
  overflow: hidden;
  padding: clamp(2.25rem, 6vw, 5rem);
  border-radius: var(--dsc-radius-lg);
  color: #ffffff;
  background: var(--dsc-primary);
  box-shadow: var(--dsc-shadow-md);
}

.dsc-cta::after {
  position: absolute;
  inset: -8rem -7rem auto auto;
  width: 20rem;
  height: 20rem;
  border-radius: 50%;
  background: rgba(214, 90, 49, 0.24);
  content: "";
  pointer-events: none;
}

.dsc-cta > * {
  position: relative;
  z-index: 1;
}

.dsc-cta :where(h2, h3, p) {
  color: inherit;
}

.dsc-local-card {
  padding: clamp(1.25rem, 3vw, 2rem);
  border: 1px solid var(--dsc-border);
  border-radius: var(--dsc-radius-md);
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(8px);
}

.dsc-placeholder {
  display: grid;
  min-height: 280px;
  padding: 2rem;
  place-items: center;
  border: 1.5px dashed var(--dsc-border);
  border-radius: var(--dsc-radius-md);
  color: var(--dsc-muted);
  background:
    linear-gradient(135deg, rgba(23, 50, 77, 0.04), rgba(214, 90, 49, 0.07));
  text-align: center;
}

/* ==========================================================================
   CONTRAT PUBLIC DE CLASSES DSC — VERSION 1.1
   Ces classes peuvent être utilisées par le GPT, dans les patterns Gutenberg
   ou dans le champ « Classe(s) CSS additionnelle(s) » des blocs.
   Les anciennes classes restent supportées.
   ========================================================================== */

/* HERO : variantes de structure et de contraste. */
.dsc-hero--split .wp-block-columns {
  align-items: center;
  gap: clamp(2rem, 5vw, 5rem);
}

.dsc-hero--split .wp-block-column {
  min-width: 0;
}

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

.dsc-hero--center :where(.dsc-lead, .dsc-measure) {
  margin-inline: auto;
}

.dsc-hero--center .wp-block-buttons {
  justify-content: center;
}

.dsc-hero--dark {
  color: #ffffff;
  background:
    radial-gradient(circle at 82% 12%, color-mix(in srgb, var(--dsc-accent) 28%, transparent), transparent 28rem),
    linear-gradient(145deg, color-mix(in srgb, var(--dsc-primary) 88%, #000000), var(--dsc-primary));
}

.dsc-hero--dark :where(h1, h2, h3, h4, h5, h6, p, li, a:not(.dsc-button)) {
  color: inherit;
}

.dsc-hero--dark .dsc-lead,
.dsc-hero--dark .dsc-muted {
  color: rgba(255, 255, 255, 0.78);
}

.dsc-hero--dark .dsc-hero__visual {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: none;
  backdrop-filter: blur(10px);
}

/* BOUTONS : utilisables sur un lien, un bouton HTML ou un bloc personnalisé. */
.dsc-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.85rem 1.35rem;
  border: 2px solid transparent;
  border-radius: var(--dsc-radius-pill);
  font: inherit;
  font-weight: 800;
  line-height: 1.15;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition:
    transform var(--dsc-transition),
    box-shadow var(--dsc-transition),
    color var(--dsc-transition),
    border-color var(--dsc-transition),
    background-color var(--dsc-transition);
}

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

.dsc-button--primary {
  color: #ffffff;
  border-color: var(--dsc-accent);
  background: var(--dsc-accent);
}

.dsc-button--primary:hover,
.dsc-button--primary:focus-visible {
  color: #ffffff;
  border-color: color-mix(in srgb, var(--dsc-accent) 82%, #000000);
  background: color-mix(in srgb, var(--dsc-accent) 82%, #000000);
}

.dsc-button--secondary {
  color: var(--dsc-primary);
  border-color: var(--dsc-primary);
  background: transparent;
}

.dsc-button--secondary:hover,
.dsc-button--secondary:focus-visible {
  color: #ffffff;
  background: var(--dsc-primary);
}

.dsc-hero--dark .dsc-button--secondary,
.dsc-section--dark .dsc-button--secondary,
.dsc-footer .dsc-button--secondary {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.72);
}

.dsc-hero--dark .dsc-button--secondary:hover,
.dsc-section--dark .dsc-button--secondary:hover,
.dsc-footer .dsc-button--secondary:hover,
.dsc-hero--dark .dsc-button--secondary:focus-visible,
.dsc-section--dark .dsc-button--secondary:focus-visible,
.dsc-footer .dsc-button--secondary:focus-visible {
  color: var(--dsc-primary);
  background: #ffffff;
}

/* BADGE : alias public de l'ancienne classe .dsc-chip. */
.dsc-badge {
  display: inline-flex;
  align-items: center;
  min-height: 2.25rem;
  padding: 0.45rem 0.85rem;
  border: 1px solid var(--dsc-border);
  border-radius: var(--dsc-radius-pill);
  color: var(--dsc-secondary);
  background: color-mix(in srgb, var(--dsc-background) 88%, transparent);
  font-size: 0.9rem;
  font-weight: 750;
  line-height: 1.2;
}

/* GRILLES : rendent les cartes indépendantes du comportement flex de Columns. */
.dsc-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
  gap: clamp(1rem, 2.5vw, 1.75rem);
}

.dsc-card-grid > .wp-block-column {
  min-width: 0;
  margin: 0;
}

/* PROCESSUS : la classe .dsc-steps existante reste un alias compatible. */
.dsc-process,
.dsc-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr));
  gap: clamp(1rem, 2.5vw, 1.75rem);
}

.dsc-process > .wp-block-column,
.dsc-steps > .wp-block-column {
  min-width: 0;
  margin: 0;
}

/* FORMULAIRES : à appliquer au groupe qui contient le formulaire. */
.dsc-form {
  width: 100%;
}

.dsc-form :where(label, legend) {
  display: block;
  margin-bottom: 0.45rem;
  color: var(--dsc-text);
  font-weight: 750;
  line-height: 1.35;
}

.dsc-form :where(input:not([type="checkbox"]):not([type="radio"]), select, textarea) {
  width: 100%;
  max-width: 100%;
  min-height: 3.25rem;
  padding: 0.8rem 0.95rem;
  border: 1px solid var(--dsc-border);
  border-radius: var(--dsc-radius-sm);
  color: var(--dsc-text);
  background: var(--dsc-background);
  font: inherit;
  line-height: 1.4;
  transition:
    border-color var(--dsc-transition),
    box-shadow var(--dsc-transition),
    background-color var(--dsc-transition);
}

.dsc-form textarea {
  min-height: 8rem;
  resize: vertical;
}

.dsc-form :where(input, select, textarea):focus {
  outline: none;
  border-color: var(--dsc-accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--dsc-accent) 22%, transparent);
}

.dsc-form :where(input[type="checkbox"], input[type="radio"]) {
  width: 1.1rem;
  height: 1.1rem;
  margin-inline-end: 0.45rem;
  accent-color: var(--dsc-accent);
}

.dsc-form :where(button, input[type="submit"]) {
  min-height: 3rem;
  padding: 0.85rem 1.35rem;
  border: 2px solid var(--dsc-accent);
  border-radius: var(--dsc-radius-pill);
  color: #ffffff;
  background: var(--dsc-accent);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.dsc-form :where(.form-row, .wp-block-group) + :where(.form-row, .wp-block-group) {
  margin-top: 1rem;
}

/* BANDEAU CTA : alias public de l'ancienne classe .dsc-cta. */
.dsc-cta-band {
  position: relative;
  overflow: hidden;
  padding: clamp(2.25rem, 6vw, 5rem);
  border-radius: var(--dsc-radius-lg);
  color: #ffffff;
  background: var(--dsc-primary);
  box-shadow: var(--dsc-shadow-md);
}

.dsc-cta-band::after {
  position: absolute;
  inset: -8rem -7rem auto auto;
  width: 20rem;
  height: 20rem;
  border-radius: 50%;
  background: color-mix(in srgb, var(--dsc-accent) 32%, transparent);
  content: "";
  pointer-events: none;
}

.dsc-cta-band > * {
  position: relative;
  z-index: 1;
}

.dsc-cta-band :where(h1, h2, h3, h4, h5, h6, p, li) {
  color: inherit;
}

/* FOOTER : volontairement opt-in pour ne pas écraser le footer Astra existant. */
.dsc-footer {
  padding: clamp(2.5rem, 6vw, 5rem) 0;
  color: rgba(255, 255, 255, 0.82);
  background: var(--dsc-primary);
}

.dsc-footer :where(h2, h3, h4, strong) {
  color: #ffffff;
}

.dsc-footer a {
  color: inherit;
  text-decoration-color: color-mix(in srgb, currentColor 42%, transparent);
}

.dsc-footer a:hover,
.dsc-footer a:focus-visible {
  color: #ffffff;
}

.dsc-footer__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr));
  gap: clamp(1.5rem, 4vw, 3.5rem);
}

/* Alias explicites conservés pour compatibilité avec les patterns 1.0. */
.dsc-cta-band.dsc-cta,
.dsc-badge.dsc-chip {
  /* Les deux noms peuvent coexister sans effet secondaire. */
}

