/* ════════════════════════════════════════════════════════════════════
 * Apprendre Autrement — Styles spécifiques aux pages de module
 * ════════════════════════════════════════════════════════════════════ */

.aa-module {
  padding: 48px 0 96px;
  background: var(--mcw-bg, #FDFCF8);
  min-height: 60vh;
}

/* ─── BARRE VOIX (tu/vous toggle) ────────── */
.aa-voice-bar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 16px;
}
.aa-voice-bar--landing {
  padding-top: 16px;
}
.aa-voice-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: 'DM Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--mcw-ink-soft, #4A4870);
  background: var(--mcw-secondary-soft, #E8E2F4);
  border: 1px solid #C7BBE2;
  padding: 8px 16px;
  border-radius: 999px;
  font-weight: 500;
}
.aa-voice-toggle-label {
  margin-right: 4px;
  opacity: 0.75;
}
.aa-voice-toggle-link {
  color: var(--mcw-ink-soft, #4A4870);
  text-decoration: none;
  padding: 3px 10px;
  border-radius: 999px;
  transition: all .15s;
  font-weight: 500;
}
.aa-voice-toggle-link:hover {
  color: var(--mcw-secondary-2, #2D2A52);
}
.aa-voice-toggle-link.is-active {
  font-weight: 700;
  color: white;
  background: var(--mcw-secondary-3, #7C5CBF);
}
.aa-voice-toggle-sep {
  opacity: 0.4;
}

/* ─── Barre de progression scroll (en haut viewport) ───── */
.aa-scroll-progress {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: rgba(124,92,191,0.10);
  z-index: 100;
  pointer-events: none;
}
.aa-scroll-progress-fill {
  display: block;
  height: 100%;
  width: 0%;
  background: var(--mcw-secondary-3, #7C5CBF);
  transition: width .15s ease-out;
}

/* ─── BREADCRUMB ─────────────────────────── */
.aa-breadcrumb {
  font-family: 'DM Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.05em;
  color: var(--mcw-ink-muted, #8886A8);
  margin-bottom: 24px;
}
.aa-breadcrumb a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px dotted currentColor;
}
.aa-breadcrumb a:hover { color: var(--mcw-accent, #4E7FA8); }

/* ─── EN-TÊTE MODULE ─────────────────────── */
.aa-module-head {
  border-bottom: 1px solid var(--mcw-line, #E0DEEA);
  padding-bottom: 32px;
  margin-bottom: 40px;
}
.aa-module-head h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(32px, 5vw, 52px);
  line-height: 1.1;
  font-weight: 600;
  margin: 8px 0 16px;
}
.aa-module-meta {
  font-size: 14px;
  color: var(--mcw-ink-muted, #8886A8);
  margin-top: 16px;
}

.aa-pill {
  display: inline-block;
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  padding: 3px 10px;
  border-radius: 999px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  vertical-align: 2px;
  margin-left: 6px;
}
/* Pastilles statut — contraste AAA (texte foncé sur fond pastel) */
.aa-pill-soon  { background: #F4EFE3; color: #6A5C3B; }
.aa-pill-draft { background: #E8EEF5; color: #355E80; }
.aa-pill-done  { background: #E0EFE3; color: #2D4E3A; }

/* ─── CORPS ─────────────────────────────── */
.aa-module-body {
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
  padding-inline: 4px;
}

.aa-module-section { margin-bottom: 40px; }

.aa-module-section h2 {
  font-family: 'Playfair Display', serif;
  font-size: 26px;
  line-height: 1.25;
  font-weight: 600;
  margin: 0 0 16px;
}

.aa-module-prose p {
  font-size: 17px;
  line-height: 1.65;
  color: var(--mcw-ink, #1A1833);
  margin: 0 0 16px;
}
.aa-module-prose strong {
  color: var(--mcw-ink, #1A1833);
  font-weight: 600;
}

.aa-module-schema {
  margin: 24px 0 8px;
}

.aa-module-q {
  background: linear-gradient(135deg, rgba(111,160,203,0.08), rgba(111,160,203,0.02));
  border-left: 3px solid var(--mcw-accent, #4E7FA8);
  padding: 24px 28px;
  border-radius: 0 8px 8px 0;
  margin: 28px 0;
}
.aa-module-q-label {
  display: block;
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mcw-accent, #4E7FA8);
  margin-bottom: 10px;
}
.aa-module-q-title {
  font-family: 'Playfair Display', serif;
  font-size: 18px;
  font-weight: 600;
  margin: 0 0 12px;
  color: var(--mcw-ink, #1A1833);
}
.aa-module-q-intro {
  margin: 0 0 14px;
  font-size: 15px;
  line-height: 1.55;
  color: var(--mcw-ink-soft, #4A4870);
  font-style: italic;
}
.aa-module-q-steps {
  margin: 0;
  padding-left: 0;
  list-style: none;
  counter-reset: aa-step;
}
.aa-module-q-steps li {
  counter-increment: aa-step;
  position: relative;
  padding-left: 36px;
  margin-bottom: 12px;
  font-size: 15px;
  line-height: 1.6;
  color: var(--mcw-ink, #1A1833);
}
.aa-module-q-steps li::before {
  content: counter(aa-step);
  position: absolute;
  left: 0;
  top: 1px;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'DM Mono', monospace;
  font-size: 12px;
  font-weight: 600;
  background: var(--mcw-accent, #4E7FA8);
  color: white;
  border-radius: 50%;
}
.aa-module-q-steps li:last-child { margin-bottom: 0; }
.aa-module-q-closing {
  margin: 14px 0 0;
  padding-top: 12px;
  border-top: 1px dashed rgba(111,160,203,0.4);
  font-size: 14px;
  line-height: 1.55;
  color: var(--mcw-ink-soft, #4A4870);
  font-style: italic;
}

/* ─── EXERCICE ──────────────────────────── */
.aa-module-exercise {
  background: white;
  border: 1px solid var(--mcw-line, #E0DEEA);
  border-radius: 16px;
  padding: 32px;
  margin: 48px auto;
  max-width: 720px;
}
.aa-module-exercise h2 {
  font-family: 'Playfair Display', serif;
  font-size: 22px;
  font-weight: 600;
  margin: 0 0 12px;
}
.aa-module-exercise p {
  font-size: 16px;
  line-height: 1.55;
  color: var(--mcw-ink-soft, #4A4870);
  margin: 0 0 16px;
}
.aa-module-textarea {
  width: 100%;
  border: 1px solid var(--mcw-line, #E0DEEA);
  border-radius: 8px;
  padding: 12px 14px;
  font-family: inherit;
  font-size: 15px;
  line-height: 1.5;
  resize: vertical;
  background: var(--mcw-bg, #FDFCF8);
}
.aa-module-textarea:focus {
  outline: 2px solid var(--mcw-accent, #4E7FA8);
  outline-offset: -1px;
}
.aa-module-exercise-note {
  font-size: 13px;
  color: var(--mcw-ink-muted, #8886A8);
  margin-top: 12px;
}

/* ─── NAV INTER-MODULES ─────────────────── */
.aa-module-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  border-top: 1px solid var(--mcw-line, #E0DEEA);
  padding-top: 24px;
  margin-top: 48px;
}
.aa-module-navlink {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px 20px;
  border-radius: 12px;
  background: white;
  border: 1px solid var(--mcw-line, #E0DEEA);
  text-decoration: none;
  color: inherit;
  transition: border-color .2s, transform .2s;
}
.aa-module-navlink:hover {
  border-color: var(--mcw-accent, #4E7FA8);
  transform: translateY(-1px);
}
.aa-module-navlink-next { text-align: right; }
.aa-module-navlink-label {
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mcw-ink-muted, #8886A8);
}
.aa-module-navlink-title {
  font-family: 'Playfair Display', serif;
  font-size: 16px;
  font-weight: 600;
  color: var(--mcw-ink, #1A1833);
}

/* ─── ATTRIBUTION ───────────────────────── */
.aa-module-attribution {
  font-size: 12px;
  font-style: italic;
  color: var(--mcw-ink-muted, #8886A8);
  text-align: center;
  margin-top: 48px;
  padding: 24px;
  border-top: 1px solid var(--mcw-line, #E0DEEA);
}

/* ─── MOBILE ─────────────────────────────── */
@media (max-width: 640px) {
  .aa-module { padding: 32px 0 64px; }
  .aa-module-nav { grid-template-columns: 1fr; }
  .aa-module-navlink-next { text-align: left; }
  .aa-module-exercise { padding: 24px; }
}

/* ─── EMPTY STATE ───────────────────────── */
.aa-module-empty {
  background: white;
  border: 1px dashed var(--mcw-line, #E0DEEA);
  border-radius: 12px;
  padding: 32px;
  text-align: center;
  max-width: 600px;
}
.aa-module-empty p { font-size: 16px; color: var(--mcw-ink-soft, #4A4870); }
