/**
 * Déclic Impact — Questionner son leadership: page layout.
 * Uses tokens from theme.css.
 */

.ae-page {
  padding: 120px 5% 80px;
  max-width: 1080px;
  margin: 0 auto;
}

.ae-view[hidden],
[hidden] {
  display: none !important;
}

/* Dev helper: JS unhides this on localhost / Cloudflare preview only. */
.ae-dev-fill {
  position: fixed;
  top: calc(var(--nav-height) + 12px);
  right: 12px;
  z-index: 200;
  background: #fff3cd;
  border: 1px dashed #b8860b;
  color: #7a5c00;
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: 4px;
  cursor: pointer;
}

.ae-dev-fill:hover {
  background: #ffe8a3;
}

.ae-intro {
  max-width: 720px;
}

.ae-intro .divider {
  margin-bottom: 28px;
}

.ae-intro-title {
  font-style: italic;
  font-weight: 400;
}

.ae-lead {
  color: var(--text-mid);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.7;
  margin-bottom: 28px;
}

.ae-lead p + p {
  margin-top: 14px;
}

.ae-scale-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 28px;
}

.ae-scale-card {
  background: white;
  border: 1px solid var(--border-form);
  border-radius: 4px;
  padding: 20px 22px;
  text-align: center;
}

.ae-scale-card h2 {
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 600;
  color: var(--navy-dark);
  margin-bottom: 8px;
}

.ae-scale-card p {
  font-family: var(--font-sans);
  color: var(--text-mid);
  font-size: 13px;
  line-height: 1.6;
}

.ae-pillars {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 32px;
}

.ae-chip {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.3px;
  padding: 6px 12px;
  border-radius: 99px;
  background: white;
  border: 1px solid var(--border-form);
  color: var(--text-dark);
}

.ae-chip[data-pillar='ancrer'] {
  border-color: rgba(232, 96, 28, 0.45);
  color: var(--orange-hover);
}

.ae-chip[data-pillar='energie'] {
  border-color: rgba(201, 161, 74, 0.55);
  color: #8a6a22;
}

.ae-chip[data-pillar='espace'] {
  border-color: rgba(61, 107, 138, 0.45);
  color: #2f5570;
}

.ae-chip[data-pillar='transcender'] {
  border-color: rgba(26, 35, 64, 0.35);
  color: var(--navy);
}

.ae-intro-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.ae-quiz {
  max-width: 720px;
  margin: 0 auto;
  padding-bottom: 88px;
}

.ae-progress {
  position: sticky;
  top: var(--nav-height);
  z-index: 20;
  background: var(--cream);
  padding: 16px 0 12px;
  margin-bottom: 4px;
}

.ae-progress-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 10px;
}

.ae-progress-label {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-mid);
}

.ae-progress-count {
  font-size: 13px;
  color: var(--text-mid);
}

.ae-progress-track {
  height: 4px;
  background: rgba(26, 35, 64, 0.12);
  border-radius: 2px;
  overflow: hidden;
}

.ae-progress-fill {
  height: 100%;
  width: 0;
  background: var(--orange);
  border-radius: 2px;
  transition: width 0.25s ease;
}

.ae-quiz-pillar {
  position: sticky;
  top: calc(var(--nav-height) + 52px);
  z-index: 15;
  background: var(--cream);
  padding: 20px 0 10px;
  border-bottom: 1px solid var(--border-form);
  margin-bottom: 4px;
}

.ae-quiz-pillar-title {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 600;
  color: var(--navy-dark);
}

.ae-quiz-pillar-desc {
  font-size: 13px;
  color: var(--text-mid);
  margin-top: 2px;
}

.ae-quiz-pillar[data-pillar='ancrer'] .ae-quiz-pillar-title {
  color: var(--orange-hover);
}

.ae-quiz-pillar[data-pillar='energie'] .ae-quiz-pillar-title {
  color: #8a6a22;
}

.ae-quiz-pillar[data-pillar='espace'] .ae-quiz-pillar-title {
  color: #2f5570;
}

.ae-quiz-pillar[data-pillar='transcender'] .ae-quiz-pillar-title {
  color: var(--navy);
}

.ae-quiz-card {
  background: white;
  border: 1px solid var(--border-form);
  border-left: 3px solid transparent;
  border-radius: 4px;
  padding: 22px 24px;
  margin: 16px 0;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.ae-quiz-card-complete {
  border-left-color: var(--orange);
}

.ae-quiz-card-flash {
  box-shadow: 0 0 0 3px rgba(232, 96, 28, 0.35);
}

.ae-quiz-card-eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--orange);
  margin-bottom: 10px;
}

.ae-quiz-statement {
  font-family: var(--font-serif);
  font-size: clamp(19px, 2.6vw, 23px);
  font-weight: 600;
  line-height: 1.35;
  color: var(--navy-dark);
  margin-bottom: 20px;
}

.ae-scales {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 0;
}

.ae-scale-head {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 12px;
}

.ae-scale-title {
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 600;
  color: var(--navy-dark);
}

.ae-scale-prompt {
  font-weight: 400;
  color: var(--text-mid);
}

.ae-scale-hint {
  font-family: var(--font-sans);
  font-size: 12px;
  line-height: 1.5;
  color: var(--text-mid);
}

.ae-scale-btns {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}

.ae-scale-btns button {
  min-height: 52px;
  font-family: var(--font-sans);
  font-size: 18px;
  font-weight: 600;
  color: var(--navy);
  background: white;
  border: 1px solid var(--border-form);
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s, transform 0.12s;
}

.ae-scale-btns button:hover {
  border-color: var(--orange);
  transform: translateY(-1px);
}

.ae-scale-btns button:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 2px;
}

.ae-scale-btns[data-scale='frequency'] button[aria-pressed='true'] {
  background: var(--orange);
  border-color: var(--orange);
  color: white;
}

.ae-scale-btns[data-scale='importance'] button[aria-pressed='true'] {
  background: var(--navy);
  border-color: var(--navy);
  color: white;
}

.ae-quiz-bar {
  position: sticky;
  bottom: 0;
  z-index: 20;
  background: white;
  border: 1px solid var(--border-form);
  border-radius: 4px;
  box-shadow: 0 -2px 12px rgba(13, 21, 37, 0.08);
  padding: 8px 16px;
  margin-top: 8px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
}

.ae-quiz-bar-count {
  font-size: 13px;
  color: var(--text-mid);
  margin-right: auto;
}

.ae-quiz-bar .btn-primary {
  padding: 11px 24px;
  font-size: 12px;
}

.ae-btn-ghost {
  display: inline-block;
  background: transparent;
  color: var(--text-mid);
  text-decoration: none;
  padding: 15px 24px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  border-radius: 2px;
  border: 1px solid var(--border-form);
  cursor: pointer;
  font-family: var(--font-sans);
  transition: color 0.2s, border-color 0.2s;
}

.ae-btn-ghost:hover:not(:disabled) {
  color: var(--navy-dark);
  border-color: var(--navy);
}

.ae-btn-ghost:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.ae-btn-ghost-light {
  border-color: rgba(255, 255, 255, 0.25);
  color: rgba(255, 255, 255, 0.85);
}

.ae-btn-ghost-light:hover:not(:disabled) {
  color: white;
  border-color: rgba(255, 255, 255, 0.7);
}

.ae-results-header {
  max-width: 720px;
  margin-bottom: 36px;
}

.ae-results-title {
  font-weight: 400;
}

.ae-title-navy {
  font-style: italic;
  color: var(--navy-dark);
}

.section-title em.ae-title-navy {
  color: var(--navy-dark);
}

.ae-results-header .divider {
  margin-bottom: 20px;
}

.ae-note {
  color: var(--text-mid);
  font-size: 15px;
  line-height: 1.7;
  margin-bottom: 12px;
}

.ae-glossary {
  background: white;
  border: 1px solid var(--border-form);
  border-radius: 4px;
  padding: 4px 20px;
  margin-bottom: 28px;
}

.ae-glossary summary {
  cursor: pointer;
  padding: 14px 0;
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 600;
  color: var(--navy-dark);
  list-style: none;
}

.ae-glossary summary::-webkit-details-marker {
  display: none;
}

.ae-glossary summary::after {
  content: '+';
  float: right;
  font-family: var(--font-sans);
  font-size: 20px;
  color: var(--orange);
}

.ae-glossary[open] summary::after {
  content: '−';
}

.ae-glossary-body {
  padding: 4px 0 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.ae-glossary-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.ae-glossary-item .ae-level-dot {
  margin-top: 5px;
  flex-shrink: 0;
}

.ae-glossary-term {
  font-size: 14px;
  font-weight: 600;
  color: var(--navy-dark);
}

.ae-glossary-desc {
  font-size: 13px;
  color: var(--text-mid);
  line-height: 1.6;
  margin-top: 2px;
}

.ae-synthesis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  margin-bottom: 36px;
}

.ae-synthesis-card {
  background: white;
  border: 1px solid var(--border-form);
  border-radius: 4px;
  padding: 20px;
}

.ae-synthesis-card h2 {
  font-family: var(--font-serif);
  font-size: 18px;
  color: var(--navy-dark);
  margin-bottom: 6px;
}

.ae-synthesis-card .ae-note {
  font-size: 13px;
  margin-bottom: 10px;
}

.ae-synthesis-empty {
  font-size: 13px;
  color: var(--text-mid);
  font-style: italic;
  padding: 6px 0;
}

.ae-synthesis-item {
  padding: 10px 0;
  border-top: 1px solid rgba(26, 35, 64, 0.08);
}

.ae-synthesis-item:first-of-type {
  border-top: none;
}

.ae-synthesis-item-force .ae-synthesis-name {
  color: var(--orange-hover);
}

.ae-synthesis-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--navy-dark);
}

.ae-synthesis-meta {
  font-size: 12px;
  color: var(--text-mid);
  margin-left: 8px;
}

.ae-synthesis-rule {
  font-size: 12px;
  color: var(--text-mid);
  margin-top: 4px;
  line-height: 1.5;
}

.ae-series-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 16px;
  list-style: none;
  margin: 0 0 18px;
  padding: 0;
}

.ae-series-legend li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-sans);
  font-size: 13px;
  color: var(--navy-dark);
  background: white;
  border: 1px solid var(--border-form);
  border-radius: 2px;
  padding: 5px 10px 5px 8px;
}

.ae-series-swatch {
  width: 14px;
  height: 14px;
  border-radius: 2px;
  flex-shrink: 0;
  box-sizing: border-box;
}

.ae-series-freq {
  border: 2px solid #e8601c;
  background: transparent;
}

.ae-series-imp {
  border: 2px dashed #1a2340;
  background: transparent;
}

.ae-charts {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  margin-bottom: 36px;
}

.ae-chart-card {
  background: white;
  border: 1px solid var(--border-form);
  border-radius: 4px;
  padding: 24px 20px 20px;
}

.ae-chart-card h2 {
  font-family: var(--font-serif);
  font-size: 26px;
  color: var(--navy-dark);
  margin-bottom: 8px;
}

.ae-chart-card .ae-note {
  font-family: var(--font-sans);
  font-size: 14px;
  margin-bottom: 16px;
}

.ae-chart-stage {
  position: relative;
  width: min(100%, 640px);
  margin: 0 auto 8px;
}

.ae-chart-wrap {
  position: relative;
  width: 70%;
  margin: 6% auto 8%;
  aspect-ratio: 1;
}

.ae-rosace-pillars {
  position: absolute;
  inset: 0;
  z-index: 2;
  margin: 0;
  padding: 0;
  list-style: none;
  pointer-events: none;
}

.ae-rosace-pillar {
  position: absolute;
  display: flex;
  align-items: flex-start;
  gap: 6px;
  max-width: 132px;
  font-family: var(--font-sans);
  font-size: 12px;
  line-height: 1.35;
  color: var(--text-mid);
}

.ae-rosace-pillar i {
  width: 12px;
  height: 12px;
  border-radius: 2px;
  flex-shrink: 0;
  margin-top: 2px;
  box-shadow: inset 0 0 0 1px rgba(26, 35, 64, 0.12);
}

.ae-rosace-pillar[data-pillar='ancrer'] {
  top: 22%;
  right: 0;
  max-width: 96px;
}

.ae-rosace-pillar[data-pillar='energie'] {
  right: 0;
  bottom: 10%;
  max-width: 118px;
}

.ae-rosace-pillar[data-pillar='espace'] {
  top: 38%;
  left: 0;
  max-width: 128px;
}

.ae-rosace-pillar[data-pillar='transcender'] {
  top: 8%;
  left: 0;
  max-width: 110px;
}

.ae-selected {
  text-align: center;
  font-size: 13px;
  color: var(--navy-dark);
  font-weight: 500;
  min-height: 1.4em;
  margin: 4px 0 0;
}

.ae-level-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 16px;
  margin-top: 8px;
}

.ae-level-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-mid);
}

.ae-level-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.ae-level-dot[data-level='questionner'] {
  background: #c4b8ae;
}

.ae-level-dot[data-level='demarrer'] {
  background: #f4a05a;
}

.ae-level-dot[data-level='renforcer'] {
  background: #e8601c;
}

.ae-level-dot[data-level='solide'] {
  background: #3d4a6b;
}

.ae-level-dot[data-level='force'] {
  background: #1a2340;
}

.ae-keys {
  background: white;
  border: 1px solid var(--border-form);
  border-radius: 4px;
  padding: 8px 0 12px;
  margin-bottom: 36px;
}

.ae-keys h2 {
  font-family: var(--font-serif);
  font-size: 26px;
  color: var(--navy-dark);
  padding: 16px 20px 8px;
}

.ae-keys-hint {
  font-size: 13px;
  color: var(--text-mid);
  padding: 0 20px 12px;
}

.ae-key-group + .ae-key-group {
  margin-top: 4px;
}

.ae-key-group-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--orange);
  padding: 12px 20px 6px;
}

.ae-key-group-title::before {
  content: '';
  width: 10px;
  height: 10px;
  border-radius: 2px;
  flex-shrink: 0;
  background: currentColor;
}

.ae-key-group-title[data-pillar='ancrer'] {
  color: var(--orange-hover);
}

.ae-key-group-title[data-pillar='ancrer']::before {
  background: rgba(232, 96, 28, 0.55);
}

.ae-key-group-title[data-pillar='energie'] {
  color: #8a6a22;
}

.ae-key-group-title[data-pillar='energie']::before {
  background: rgba(201, 161, 74, 0.7);
}

.ae-key-group-title[data-pillar='espace'] {
  color: #2f5570;
}

.ae-key-group-title[data-pillar='espace']::before {
  background: rgba(61, 107, 138, 0.5);
}

.ae-key-group-title[data-pillar='transcender'] {
  color: var(--navy);
}

.ae-key-group-title[data-pillar='transcender']::before {
  background: rgba(26, 35, 64, 0.4);
}

.ae-key-row {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) auto;
  gap: 8px 16px;
  align-items: center;
  width: 100%;
  text-align: left;
  background: transparent;
  border: none;
  border-top: 1px solid rgba(26, 35, 64, 0.06);
  border-left: 3px solid transparent;
  padding: 12px 20px;
  cursor: pointer;
  font-family: var(--font-sans);
  color: var(--text-dark);
}

.ae-key-row:hover {
  background: rgba(232, 96, 28, 0.06);
}

.ae-key-row[aria-current='true'] {
  background: rgba(232, 96, 28, 0.14);
  border-left-color: var(--orange);
}

.ae-key-row[aria-current='true'] .ae-key-name {
  color: var(--navy-dark);
  font-weight: 600;
}

.ae-key-name {
  font-size: 14px;
  font-weight: 500;
}

.ae-key-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  font-size: 12px;
  color: var(--text-mid);
  justify-content: flex-end;
}

.ae-key-level {
  font-weight: 600;
  color: var(--navy);
}

.ae-next {
  background: var(--navy-dark);
  color: white;
  border-radius: 4px;
  padding: 48px 40px 36px;
}

.ae-next-header {
  margin-bottom: 28px;
}

.ae-next-header h2 {
  font-family: var(--font-serif);
  font-size: 28px;
  font-weight: 600;
  margin-bottom: 16px;
}

.ae-next-divider {
  margin-bottom: 0;
}

.ae-next-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 32px;
}

.ae-next-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--card-border);
  border-radius: 4px;
  padding: 28px 26px;
  display: flex;
  flex-direction: column;
}

.ae-next-card h3 {
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 600;
  color: white;
  margin-bottom: 6px;
}

.ae-next-card > p {
  color: var(--text-on-dark);
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 18px;
}

.ae-next-card-cta {
  margin-top: auto;
  align-self: flex-start;
}

.ae-email-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

#ae-email-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 14px;
}

#ae-email-fields .ae-email-share,
#ae-email-fields button {
  grid-column: 1 / -1;
}

.ae-email-form input[type='text'],
.ae-email-form input[type='email'] {
  width: 100%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 2px;
  color: white;
  font-family: var(--font-sans);
  font-size: 14px;
  padding: 12px 14px;
}

.ae-email-form input[type='text']::placeholder,
.ae-email-form input[type='email']::placeholder {
  color: rgba(255, 255, 255, 0.45);
}

.ae-email-form input[type='text']:focus,
.ae-email-form input[type='email']:focus {
  outline: none;
  border-color: var(--orange-light);
}

.ae-email-share {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 13px;
  color: var(--text-on-dark-strong);
  cursor: pointer;
  line-height: 1.5;
}

.ae-email-share input {
  margin-top: 3px;
  flex-shrink: 0;
}

.ae-email-form .btn-primary {
  align-self: flex-start;
}

.ae-email-form .btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.ae-email-message {
  font-size: 13px;
  line-height: 1.6;
  margin: 0;
}

.ae-email-success {
  color: #9adba0;
}

.ae-email-error {
  color: #f4a5a0;
}

.ae-next-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

@media (max-width: 768px) {
  .ae-page {
    padding: 96px 5% 64px;
  }

  .ae-scale-cards {
    grid-template-columns: 1fr;
  }

  .ae-quiz-card {
    padding: 16px 16px 18px;
  }

  .ae-quiz-statement {
    font-size: 18px;
    margin-bottom: 16px;
  }

  .ae-quiz-pillar {
    top: calc(var(--nav-height) + 44px);
    padding: 14px 0 8px;
  }

  .ae-scale-btns button {
    min-height: 44px;
    font-size: 16px;
  }

  .ae-quiz-bar {
    padding: 8px 14px;
  }

  .ae-key-row {
    grid-template-columns: 1fr;
  }

  .ae-key-meta {
    justify-content: flex-start;
  }

  .ae-next {
    padding: 32px 20px 28px;
  }

  .ae-next-cards {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .ae-next-card {
    padding: 22px 20px;
  }

  #ae-email-fields {
    grid-template-columns: 1fr;
  }

  .ae-email-form .btn-primary,
  .ae-next-card-cta {
    width: 100%;
    text-align: center;
  }

  .ae-next-footer {
    flex-direction: column;
    align-items: stretch;
  }

  .ae-next-footer .ae-btn-ghost {
    width: 100%;
    text-align: center;
  }

  .ae-chart-card {
    padding: 16px 10px 14px;
  }

  .ae-chart-card h2 {
    font-size: 22px;
  }

  .ae-chart-card .ae-note {
    font-size: 13px;
    margin-bottom: 10px;
  }

  .ae-chart-stage {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: none;
    margin: 0 auto 4px;
  }

  .ae-chart-wrap {
    order: 1;
    width: 100%;
    margin: 0 auto 12px;
  }

  .ae-rosace-pillars {
    order: 2;
    position: static;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 14px;
    inset: auto;
    z-index: auto;
    pointer-events: auto;
  }

  .ae-rosace-pillar,
  .ae-rosace-pillar[data-pillar='ancrer'],
  .ae-rosace-pillar[data-pillar='energie'],
  .ae-rosace-pillar[data-pillar='espace'],
  .ae-rosace-pillar[data-pillar='transcender'] {
    position: static;
    top: auto;
    right: auto;
    bottom: auto;
    left: auto;
    max-width: none;
    font-size: 12px;
    align-items: center;
  }
}

@media (max-width: 480px) {
  .ae-scale-hint {
    font-size: 12px;
  }
}
