:root {
  --arepo-ink: #173c39;
  --arepo-accent: #0bb4aa;
  --arepo-accent-dark: #087f78;
  --arepo-pale: #f2fbfa;
  --arepo-line: #dcecea;
  --arepo-soft-line: #d7efec;
  --arepo-shadow: 0 8px 24px rgba(17, 77, 73, 0.06);
}

/* Encadrés */
.wp-block-group.is-style-arepo-intro {
  margin: 0 0 36px;
  padding: 22px 24px;
  background: linear-gradient(135deg, var(--arepo-pale) 0%, #fff 100%);
  border-left: 4px solid var(--arepo-accent);
  border-radius: 0 12px 12px 0;
  box-shadow: var(--arepo-shadow);
  color: var(--arepo-ink);
  font-size: 18px;
  line-height: 1.8;
}

.wp-block-group.is-style-arepo-intro > :last-child,
.is-style-arepo-card > :last-child,
.is-style-arepo-exercise > :last-child {
  margin-bottom: 0;
}

.is-style-arepo-card,
.is-style-arepo-exercise {
  margin: 24px 0 36px;
  padding: 22px 24px;
  border: 1px solid var(--arepo-soft-line);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(17, 77, 73, 0.05);
}

.is-style-arepo-card {
  background: #fbfdfd;
}

.is-style-arepo-exercise {
  background: var(--arepo-pale);
  border-left: 4px solid var(--arepo-accent);
}

/* Titres */
h2.is-style-arepo-chapter-title,
.editor-styles-wrapper h2.is-style-arepo-chapter-title {
  margin-top: 72px;
  margin-bottom: 22px;
  padding-top: 36px;
  border-top: 1px solid var(--arepo-line);
  color: var(--arepo-ink);
  font-size: clamp(28px, 3vw, 38px);
  line-height: 1.2;
  scroll-margin-top: 110px;
}

h3.is-style-arepo-step-label,
h4.is-style-arepo-step-label,
.editor-styles-wrapper .is-style-arepo-step-label {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 38px 0 14px;
  color: var(--arepo-accent-dark);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.is-style-arepo-step-label::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--arepo-line);
}

/* Navigation */
.wp-block-buttons.is-style-arepo-chapter-nav {
  gap: 8px;
  margin: 24px 0 52px;
  padding: 12px;
  background: rgba(242, 251, 250, 0.82);
  border: 1px solid var(--arepo-soft-line);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(17, 77, 73, 0.05);
}

.is-style-arepo-chapter-nav .wp-block-button__link {
  padding: 10px 16px !important;
  font-size: 12px;
  letter-spacing: 0.045em;
  white-space: nowrap;
}

/* Boutons */
.wp-block-button.is-style-arepo-light .wp-block-button__link,
.wp-block-button.is-style-arepo-action .wp-block-button__link {
  border: 1px solid rgba(11, 180, 170, 0.26);
  border-radius: 8px;
  box-shadow: 0 3px 10px rgba(17, 77, 73, 0.08);
  font-weight: 600;
  text-decoration: none;
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.wp-block-button.is-style-arepo-light .wp-block-button__link {
  background: var(--arepo-pale);
  color: var(--arepo-accent-dark);
}

.wp-block-button.is-style-arepo-action .wp-block-button__link {
  background: var(--arepo-accent);
  color: #fff;
}

.wp-block-button.is-style-arepo-light .wp-block-button__link:hover,
.wp-block-button.is-style-arepo-action .wp-block-button__link:hover {
  background: var(--arepo-accent);
  border-color: var(--arepo-accent);
  color: #fff;
  transform: translateY(-1px);
}

/* Citations et tableaux */
blockquote.is-style-arepo-observation,
.editor-styles-wrapper blockquote.is-style-arepo-observation {
  margin: 16px 0 32px;
  padding: 20px 24px;
  max-width: 100%;
  background: #fbfdfd;
  border: 0;
  border-left: 3px solid #7bd2cc;
  border-radius: 0 10px 10px 0;
  box-shadow: none;
  font-size: 16px;
  line-height: 1.7;
}

blockquote.is-style-arepo-observation::before,
blockquote.is-style-arepo-observation::after {
  display: none !important;
}

.wp-block-table.is-style-arepo-table {
  margin: 22px 0 32px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.wp-block-table.is-style-arepo-table table {
  border-color: var(--arepo-line);
}

@media (max-width: 782px) {
  .wp-block-group.is-style-arepo-intro {
    padding: 18px 20px;
    font-size: 16px;
  }

  .wp-block-buttons.is-style-arepo-chapter-nav {
    flex-wrap: nowrap !important;
    justify-content: flex-start;
    overflow-x: auto;
    margin-bottom: 40px;
    padding: 10px;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
  }

  .is-style-arepo-chapter-nav .wp-block-button {
    flex: 0 0 auto;
  }

  .is-style-arepo-chapter-nav .wp-block-button__link {
    padding: 9px 14px !important;
    font-size: 11px;
  }

  h2.is-style-arepo-chapter-title,
  .editor-styles-wrapper h2.is-style-arepo-chapter-title {
    margin-top: 54px;
    padding-top: 28px;
    font-size: 28px;
    scroll-margin-top: 90px;
  }

  .is-style-arepo-step-label {
    margin-top: 34px;
  }

  blockquote.is-style-arepo-observation {
    padding: 16px 18px;
  }
}



/* Réglages du parcours AREPO : réutilisables sur toute page qui contient un titre de chapitre AREPO. */

:is(.entry-content, .editor-styles-wrapper):has(.is-style-arepo-chapter-title) {
  font-size: 17px;
  line-height: 1.75;
}

:is(.entry-content, .editor-styles-wrapper):has(.is-style-arepo-chapter-title) p {
  margin-bottom: 1.2em;
}

:is(.entry-content, .editor-styles-wrapper) .wp-block-group.is-style-arepo-intro {
  margin: 0 0 36px;
  padding: 22px 24px;
  background: linear-gradient(135deg, #f2fbfa 0%, #ffffff 100%);
  border-left: 4px solid #0bb4aa;
  border-radius: 0 12px 12px 0;
  box-shadow: 0 8px 24px rgba(17, 77, 73, 0.06);
  font-size: 18px;
  line-height: 1.8;
}

:is(.entry-content, .editor-styles-wrapper) .is-style-arepo-chapter-nav {
  gap: 8px;
  margin: 24px 0 52px;
  padding: 12px;
  background: rgba(242, 251, 250, 0.82);
  border: 1px solid #d7efec;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(17, 77, 73, 0.05);
}

:is(.entry-content, .editor-styles-wrapper) .is-style-arepo-chapter-nav .wp-block-button__link {
  padding: 10px 16px !important;
  font-size: 12px;
  letter-spacing: 0.045em;
  white-space: nowrap;
}

:is(.entry-content, .editor-styles-wrapper) .is-style-arepo-chapter-title {
  margin-top: 72px;
  margin-bottom: 22px;
  padding-top: 36px;
  border-top: 1px solid #dcecea;
  color: #173c39;
  font-size: clamp(28px, 3vw, 38px);
  line-height: 1.2;
  scroll-margin-top: 150px;
}

:is(.entry-content, .editor-styles-wrapper) .is-style-arepo-step-label {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 38px 0 14px;
  color: #087f78;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

:is(.entry-content, .editor-styles-wrapper) .is-style-arepo-step-label::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #dcecea;
}

:is(.entry-content, .editor-styles-wrapper) blockquote.is-style-arepo-observation {
  margin: 16px 0 32px;
  padding: 20px 24px;
  max-width: 100%;
  background: #fbfdfd;
  border: 0;
  border-left: 3px solid #7bd2cc;
  border-radius: 0 10px 10px 0;
  box-shadow: none;
  font-size: 16px;
  line-height: 1.7;
}

:is(.entry-content, .editor-styles-wrapper) blockquote.is-style-arepo-observation::before,
:is(.entry-content, .editor-styles-wrapper) blockquote.is-style-arepo-observation::after {
  display: none !important;
}

:is(.entry-content, .editor-styles-wrapper) .wp-block-table.is-style-arepo-table {
  margin: 22px 0 32px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

:is(.entry-content, .editor-styles-wrapper) .wp-block-table.is-style-arepo-table table {
  border-color: #dcecea;
}

:is(.entry-content, .editor-styles-wrapper):has(.is-style-arepo-chapter-title) .wp-block-buttons:not(.is-style-arepo-chapter-nav) {
  gap: 12px;
  margin-top: 12px;
  margin-bottom: 44px;
}

@media (max-width: 782px) {
  :is(.entry-content, .editor-styles-wrapper):has(.is-style-arepo-chapter-title) {
    font-size: 16px;
    line-height: 1.7;
  }

  :is(.entry-content, .editor-styles-wrapper) .wp-block-group.is-style-arepo-intro {
    padding: 18px 20px;
    font-size: 16px;
  }

  :is(.entry-content, .editor-styles-wrapper) .is-style-arepo-chapter-nav {
    flex-wrap: nowrap !important;
    justify-content: flex-start;
    overflow-x: auto;
    padding: 10px;
    margin-bottom: 40px;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
  }

  :is(.entry-content, .editor-styles-wrapper) .is-style-arepo-chapter-nav .wp-block-button {
    flex: 0 0 auto;
  }

  :is(.entry-content, .editor-styles-wrapper) .is-style-arepo-chapter-nav .wp-block-button__link {
    padding: 9px 14px !important;
    font-size: 11px;
  }

  :is(.entry-content, .editor-styles-wrapper) .is-style-arepo-chapter-title {
    margin-top: 54px;
    padding-top: 28px;
    font-size: 28px;
  }

  :is(.entry-content, .editor-styles-wrapper) .is-style-arepo-step-label {
    margin-top: 34px;
  }

  :is(.entry-content, .editor-styles-wrapper) blockquote.is-style-arepo-observation {
    padding: 16px 18px;
  }
}
:is(.entry-content, .editor-styles-wrapper):has(.is-style-arepo-chapter-title) .wp-block-group.is-style-arepo-intro { color: inherit; }
.wp-block-table.is-style-arepo-table tbody tr:nth-child(odd) { background-color: #f0f0f0; }


/* Réponses dépliables : les règles importantes remplacent les anciens
   réglages visuels enregistrés dans les blocs, sans modifier leur contenu. */
details.wp-block-details {
  box-sizing: border-box;
  background: #f2fbfa !important;
  color: #173c39 !important;
  border: 1px solid #d7efec !important;
  border-radius: 12px !important;
  padding: clamp(16px, 3vw, 24px) !important;
  margin-block: 24px;
  box-shadow: none !important;
  font-family: inherit;
  line-height: 1.75;
}
details.wp-block-details > summary {
  display: list-item;
  cursor: pointer;
  color: #087f78 !important;
  background: transparent !important;
  font-family: inherit;
  font-weight: 600;
  line-height: 1.5;
  list-style-position: inside;
}
details.wp-block-details > summary::marker {
  color: #087f78;
}
details.wp-block-details > summary:hover {
  color: #173c39 !important;
}
details.wp-block-details > summary:focus-visible {
  outline: 2px solid #087f78;
  outline-offset: 5px;
  border-radius: 3px;
}
details.wp-block-details[open] > summary {
  margin-bottom: 20px;
}
details.wp-block-details > :last-child {
  margin-bottom: 0;
}
/* Annotations imbriquées : mêmes repères, présentation plus discrète. */
details.wp-block-details details.wp-block-details {
  background: #ffffff !important;
  border-color: #dcecea !important;
  border-radius: 8px !important;
  padding: 12px 16px !important;
  margin-block: 12px;
}


@layer arepo-quiz {


/* Quiz Maker — commandes harmonisées avec les boutons légers AREPO. */
.ays-quiz-container .action-button {
  box-sizing: border-box;
  min-height: 44px;
  max-width: 100%;
  padding: 10px 20px !important;
  background: #f2fbfa !important;
  color: #087f78 !important;
  border: 1px solid #b5dfda !important;
  border-radius: 8px !important;
  box-shadow: 0 3px 10px rgba(17,77,73,.06) !important;
  font-family: inherit !important;
  font-size: 16px !important;
  font-weight: 600 !important;
  line-height: 1.4 !important;
  text-transform: none !important;
  text-shadow: none !important;
  letter-spacing: .02em;
  white-space: normal;
  cursor: pointer;
  transition: background-color 160ms ease, color 160ms ease, border-color 160ms ease;
}
.ays-quiz-container .action-button:hover:not(:disabled):not([aria-disabled="true"]) {
  background: #e1f5f2 !important;
  color: #173c39 !important;
  border-color: #087f78 !important;
}
.ays-quiz-container .action-button:focus-visible {
  outline: 2px solid #087f78 !important;
  outline-offset: 3px;
}
.ays-quiz-container .action-button:active:not(:disabled):not([aria-disabled="true"]) {
  background: #d7efec !important;
  box-shadow: none !important;
}
.ays-quiz-container .action-button:disabled,
.ays-quiz-container .action-button[aria-disabled="true"] {
  opacity: .55;
  cursor: not-allowed;
  box-shadow: none !important;
}
@media (prefers-reduced-motion: reduce) {
  .ays-quiz-container .action-button { transition: none; }
}

}
