:root {
  --orange: #e8753d;
  --orange-dark: #c95a28;
  --orange-soft: #fff0e8;
  --ink: #222329;
  --muted: #687080;
  --line: #e9e2dc;
  --soft: #faf8f6;
  --cream: #fbf5f0;
  --green: #2f8b68;
  --green-soft: #eaf7f1;
  --white: #ffffff;
  --shadow: 0 24px 65px rgba(53, 39, 30, .10);
}

body.peggy-theme {
  color: var(--ink);
  background: var(--white);
}

.peggy-container {
  width: min(1320px, calc(100% - 48px));
  margin-inline: auto;
}

.peggy-header {
  border-bottom: 1px solid rgba(34, 35, 41, .08);
  background: rgba(255, 255, 255, .96);
}

.peggy-header__inner {
  min-height: 62px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.peggy-brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--ink);
  font-weight: 900;
  text-decoration: none;
}

.peggy-brand__mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 12px;
  background: var(--orange);
  color: var(--white);
  font-weight: 950;
}

.peggy-brand small {
  display: block;
  color: var(--muted);
  font-size: .72rem;
  font-weight: 650;
  letter-spacing: .02em;
}

.peggy-header__note {
  color: var(--muted);
  font-size: .84rem;
}

.capture-hero {
  padding: clamp(34px, 4.2vw, 64px) 0;
  background:
    radial-gradient(circle at 92% 9%, rgba(232, 117, 61, .13), transparent 28%),
    var(--cream);
}

.capture-hero__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: clamp(32px, 4vw, 60px);
}

.peggy-badge {
  display: inline-flex;
  margin: 0 0 18px;
  padding: 7px 14px;
  border: 1px solid #f3cbb8;
  border-radius: 999px;
  background: #fff7f2;
  color: var(--orange-dark);
  font-size: .78rem;
  font-weight: 900;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.capture-hero h1 {
  margin: 0;
  max-width: 760px;
  font-size: clamp(2.6rem, 4.3vw, 4.25rem);
  line-height: .99;
  letter-spacing: -.058em;
}

.capture-hero__subtitle {
  margin: 18px 0 0;
  color: #444a55;
  font-size: clamp(1.08rem, 1.8vw, 1.28rem);
  line-height: 1.52;
}

.capture-hero__text {
  max-width: 720px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 1.06rem;
  line-height: 1.65;
}

.capture-promise {
  margin-top: 22px;
  padding: 14px 18px;
  border-left: 4px solid var(--orange);
  border-radius: 0 15px 15px 0;
  background: rgba(255, 255, 255, .75);
  color: #4d586c;
  font-weight: 800;
}

.capture-form-card {
  overflow: hidden;
  border: 1px solid #eadfd8;
  border-radius: 30px;
  background: var(--white);
  box-shadow: var(--shadow);
}

.book-stage {
  display: grid;
  min-height: 300px;
  place-items: center;
  padding: 38px;
  border-top: 7px solid var(--orange);
  background: linear-gradient(145deg, #fbf4ef, #f5eee8);
}

.book-stage.has-horizontal-image {
  min-height: 210px;
  padding: 16px;
  overflow: hidden;
}

.capture-horizontal-image {
  width: auto;
  height: auto;
  max-width: min(72%, 300px);
  max-height: 180px;
  object-fit: contain;
  object-position: center;
  filter: drop-shadow(0 18px 24px rgba(36, 31, 28, .18));
}

.book-mockup {
  position: relative;
  width: 185px;
  min-height: 250px;
  padding: 34px 25px;
  border-left: 7px solid var(--orange);
  border-radius: 4px 17px 17px 4px;
  background: #303541;
  color: var(--white);
  box-shadow: 23px 24px 35px rgba(38, 34, 31, .25);
  transform: rotate(-3deg);
}

.book-mockup::after {
  content: "";
  position: absolute;
  right: -5px;
  bottom: 8px;
  width: 6px;
  height: calc(100% - 16px);
  border-radius: 0 9px 9px 0;
  background: #f4eee8;
}

.book-mockup__kicker {
  color: var(--orange);
  font-size: .66rem;
  font-weight: 900;
  letter-spacing: .2em;
  text-transform: uppercase;
}

.book-mockup__rule {
  width: 46px;
  height: 4px;
  margin: 20px 0;
  border-radius: 99px;
  background: var(--orange);
}

.book-mockup strong {
  display: block;
  font-size: 1.16rem;
  line-height: 1.35;
}

.book-mockup small {
  position: absolute;
  left: 25px;
  bottom: 25px;
  color: #bec4cf;
  font-size: .58rem;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.capture-form {
  padding: clamp(26px, 3vw, 34px);
}

main.peggy-theme .capture-form > input.skifo-capture-form__hp {
  display: none !important;
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  pointer-events: none !important;
}

.capture-form h2 {
  margin: 0;
  font-size: clamp(1.8rem, 3vw, 2.55rem);
  line-height: 1.08;
  letter-spacing: -.04em;
}

.capture-form > p {
  margin: 13px 0 0;
  color: var(--muted);
}

.capture-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 13px;
  margin-top: 20px;
}

.capture-consent,
.capture-form__message,
.capture-submit,
.capture-trust {
  grid-column: 1 / -1;
}

.capture-field label {
  display: block;
  margin-bottom: 7px;
  font-size: .86rem;
  font-weight: 820;
}

.capture-field input {
  width: 100%;
  min-height: 50px;
  padding: 13px 15px;
  border: 2px solid var(--line);
  border-radius: 14px;
  background: var(--white);
  color: var(--ink);
}

.capture-field input:focus {
  border-color: var(--orange);
  outline: 3px solid rgba(232, 117, 61, .15);
}

.capture-consent {
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 11px;
  align-items: start;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 13px;
  color: #545b67;
  font-size: .84rem;
  line-height: 1.5;
}

.capture-consent input { margin-top: 4px; accent-color: var(--orange); }
.capture-consent a { font-weight: 800; }

.capture-submit {
  width: 100%;
  margin-top: 15px;
}

.capture-trust {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 9px;
  margin-top: 18px;
}

.capture-trust span {
  padding: 7px 11px;
  border-radius: 999px;
  background: #f7f4f2;
  color: #636b77;
  font-size: .75rem;
  font-weight: 750;
}

.capture-trust span::before { content: "•"; margin-right: 7px; color: #48a77a; }

.capture-section {
  padding: clamp(68px, 8vw, 108px) 0;
}

.capture-section--cream { background: var(--cream); }

.peggy-section-heading {
  max-width: 840px;
  margin: 0 auto 45px;
  text-align: center;
}

.peggy-section-heading .kicker { margin-bottom: 12px; }

.peggy-section-heading h2 {
  margin: 0;
  font-size: clamp(2.15rem, 4.6vw, 3.9rem);
  line-height: 1.04;
  letter-spacing: -.052em;
}

.peggy-section-heading p {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 1.06rem;
}

.peggy-author {
  max-width: 980px;
  margin-inline: auto;
  padding: clamp(34px, 5vw, 58px);
  border: 1px solid #eadfd8;
  border-radius: 28px;
  background: var(--white);
  text-align: center;
  box-shadow: 0 18px 48px rgba(52, 41, 34, .07);
}

.peggy-avatar {
  display: grid;
  width: 112px;
  height: 112px;
  margin: 0 auto 25px;
  place-items: center;
  border: 5px solid #fff2eb;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--orange), #bd4f25);
  color: var(--white);
  font-size: 2rem;
  font-weight: 950;
  letter-spacing: -.05em;
  overflow: hidden;
}

.peggy-avatar img {
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: cover;
  object-position: center;
}

.peggy-author h2 { margin: 0; font-size: clamp(2rem, 4vw, 3rem); letter-spacing: -.045em; }
.peggy-author__role { margin: 7px 0 0; color: #7a7b7d; font-size: 1.06rem; }
.peggy-author__bio { max-width: 800px; margin: 25px auto 0; color: #525966; font-size: 1.04rem; line-height: 1.8; }

.error-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.error-item {
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 18px;
  padding: 27px;
  border: 1px solid var(--line);
  border-radius: 21px;
  background: var(--white);
  box-shadow: 0 12px 34px rgba(44, 37, 33, .05);
}

/* Le renderer global Skifo retire les marges horizontales de tous les articles.
   Cette règle restaure uniquement celles des cartes et du bloc auteur de Peggy. */
body.single-skifo_capture article.error-item {
  padding: 27px !important;
  padding-inline: 27px !important;
}

body.single-skifo_capture article.peggy-author {
  padding: clamp(34px, 5vw, 58px) !important;
  padding-inline: clamp(34px, 5vw, 58px) !important;
}

.error-item:last-child { grid-column: 1 / -1; }
.error-item__number { color: #f4c9b6; font-size: 2.1rem; font-weight: 950; line-height: 1; }
.error-item h3 { margin: 0; font-size: 1.16rem; line-height: 1.3; }
.error-item p { margin: 10px 0 0; color: var(--muted); line-height: 1.7; }

.capture-final {
  padding: clamp(64px, 8vw, 98px) 0;
  background: var(--cream);
  text-align: center;
}

.capture-final h2 { margin: 0; font-size: clamp(2.15rem, 4vw, 3.5rem); letter-spacing: -.05em; }
.capture-final p { margin: 14px 0 0; color: var(--muted); }

.peggy-footer {
  padding: 32px 0;
  border-top: 1px solid var(--line);
  background: #fafafa;
  color: #74777c;
  font-size: .84rem;
  text-align: center;
}

.form-success {
  display: none;
  padding: 38px;
  text-align: center;
}

.form-success.is-visible { display: block; }
.form-success h2 { margin: 0; font-size: 2rem; }
.form-success p { color: var(--muted); }

/* Personnalisation des pages de confirmation et de diagnostic copiées pour Peggy */
.peggy-theme .brand__mark { background: var(--orange); }
.peggy-theme .qual-intro {
  background:
    radial-gradient(circle at 88% 12%, rgba(232, 117, 61, .15), transparent 29%),
    linear-gradient(135deg, #fff 0%, var(--cream) 100%);
}
.peggy-theme .qual-reassurance { background: var(--white); }
.peggy-theme .site-footer { background: #fafafa; }
.peggy-theme .question-step[data-auto-advance] .next-step { display: none; }

@media (max-width: 920px) {
  .capture-hero__grid { grid-template-columns: 1fr; }
  .capture-form-card { max-width: 650px; margin-inline: auto; }
  .error-list { grid-template-columns: 1fr; }
  .error-item:last-child { grid-column: auto; }
}

@media (max-width: 640px) {
  .peggy-container { width: min(100% - 28px, 1320px); }
  .peggy-header__note { display: none; }
  .capture-hero { padding: 28px 0 42px; }
  .capture-hero__grid { gap: 24px; }
  .peggy-badge { margin-bottom: 14px; padding: 7px 13px; }
  .capture-hero h1 { font-size: clamp(2.15rem, 10.8vw, 2.8rem); line-height: 1; }
  .capture-hero__subtitle { margin-top: 16px; font-size: 1rem; line-height: 1.5; }
  .capture-hero__text { margin-top: 14px; font-size: .98rem; line-height: 1.65; }
  .capture-promise { display: none; }
  .capture-form-card { border-radius: 22px; }
  .book-stage { min-height: 220px; }
  .book-stage.has-horizontal-image { min-height: 190px; padding: 16px; }
  .capture-horizontal-image { max-width: min(78%, 270px); max-height: 170px; }
  .capture-fields { grid-template-columns: 1fr; }
  .capture-fields > * { grid-column: 1; }
  body.single-skifo_capture article.peggy-author {
    padding: 30px 22px !important;
    padding-inline: 22px !important;
  }
  .error-item { grid-template-columns: 1fr; }
  .error-item__number { font-size: 1.65rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
