/* ─── E-Learning Blu — mobile-first ───────────────── */

.app-body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

.app-main {
  flex: 1;
  background: #F0F6F8;
}

/* Le header applicatif est plein et sticky : on retire le grand
   padding-top hérité du site vitrine (évite un énorme blanc en haut,
   surtout en mobile au-dessus de l'accordéon des chapitres). */
.app-body .section--page-top {
  padding-top: 1.5rem;
}

@media (min-width: 768px) {
  .app-body .section--page-top {
    padding-top: 2.25rem;
  }
}

.app-footer {
  padding: 1.5rem 0;
  border-top: 1px solid var(--silver);
  background: var(--mist);
}

.app-footer__text {
  margin: 0;
  font-size: 0.8rem;
  color: var(--text-muted);
  text-align: center;
}

/* Header app */
.app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--blu-bleu);
  border-bottom: 1px solid rgba(240, 239, 235, 0.2);
  backdrop-filter: blur(12px);
}

.app-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}

.app-header__logo-img {
  height: 2.6rem;
  width: auto;
  display: block;
}

.app-header__logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--blu-bleu);
  border-radius: 0.6rem;
  padding: 0.3rem 0.55rem;
  box-shadow: 0 4px 12px rgba(3, 66, 109, 0.2);
}

.app-header__meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
}

.app-header__email {
  font-size: 0.8rem;
  color: var(--foam);
  max-width: 8rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: none;
}

.app-header__logout-form { margin: 0; }

.app-header .btn--outline {
  border-color: #ffffff;
  color: #ffffff;
  background: transparent;
}

.app-header .btn--outline:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
}

@media (min-width: 640px) {
  .app-header__logo-img { height: 3.1rem; }
  .app-header__email { display: block; max-width: 14rem; }
}

/* Auth */
.section--auth {
  padding: 2rem 0 3rem;
  min-height: 100vh;
  display: flex;
  align-items: center;
  background: #F0F6F8;
}

.auth-card {
  max-width: 28rem;
  margin: 0 auto;
  padding: 2rem 1.25rem;
  background: var(--blu-bleu);
  border-radius: 1rem;
  box-shadow: 0 12px 36px rgba(2, 35, 56, 0.35);
  border: 1px solid rgba(240, 239, 235, 0.22);
}

.auth-card__logo {
  display: block;
  max-width: 14rem;
  margin: 0 auto 1.5rem;
  height: auto;
  background: var(--blu-bleu);
  border-radius: 0.75rem;
  padding: 0.4rem 0.6rem;
  box-shadow: 0 6px 16px rgba(3, 66, 109, 0.18);
}

.auth-card__title {
  font-size: clamp(1.25rem, 4vw, 1.75rem);
  text-align: center;
  margin: 0 0 0.5rem;
  color: var(--foam);
}

.auth-card__subtitle,
.auth-card__email {
  text-align: center;
  color: rgba(240, 239, 235, 0.9);
  margin: 0 0 1.25rem;
  font-size: 0.95rem;
}

.auth-card__back {
  text-align: center;
  margin-top: 1rem;
}

.auth-card .btn--primary .btn__icon {
  color: var(--blu-bleu);
}

.auth-card .btn--outline {
  background: transparent;
  color: var(--foam);
  border: 2px solid rgba(240, 239, 235, 0.55);
}

.auth-card .btn--outline:hover {
  background: rgba(240, 239, 235, 0.12);
  color: #ffffff;
  border-color: var(--foam);
}

.auth-form { display: flex; flex-direction: column; gap: 1rem; }

.form-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--volcanic);
}

.auth-card .form-label {
  color: var(--foam);
}

.form-input {
  width: 100%;
  min-height: 44px;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  font-family: inherit;
  border: 1.5px solid #7a9aad;
  border-radius: 0.5rem;
  background: #ffffff;
  color: var(--volcanic);
}

.form-input::placeholder {
  color: #6b8494;
}

.form-input:focus {
  outline: 2px solid var(--blu-vert);
  outline-offset: 1px;
  border-color: var(--blu-bleu);
  box-shadow: 0 0 0 3px rgba(91, 148, 136, 0.22);
}

.auth-card .form-input {
  border: 1.5px solid rgba(255, 255, 255, 0.55);
  background: #f9fcfd;
  color: var(--abyss);
}

.auth-card .form-input:focus {
  outline: 2px solid var(--blu-vert);
  outline-offset: 2px;
  border-color: #ffffff;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.25);
}

.form-input--pin {
  text-align: center;
  font-size: 1.5rem;
  letter-spacing: 0.5em;
  font-weight: 700;
}

.poc-hint {
  background: rgba(240, 239, 235, 0.14);
  border: 1px dashed rgba(240, 239, 235, 0.5);
  border-radius: 0.5rem;
  padding: 0.75rem 1rem;
  text-align: center;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  color: var(--foam);
}

.auth-card .btn--primary {
  background: var(--foam);
  color: var(--blu-bleu);
  border: 2px solid transparent;
}

.auth-card .btn--primary:hover {
  background: #ffffff;
  color: var(--volcanic);
}

/* Alerts */
.alert {
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

.alert--error { background: #fde8e8; color: #9b1c1c; border: 1px solid #f5c6c6; }
.alert--warning { background: #fef9e7; color: #856404; border: 1px solid #ffeeba; }

/* Layout helpers */
.container--narrow { max-width: 40rem; }
.container--content { max-width: 48rem; }

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}

.breadcrumb a { color: var(--blu-vert); }
.breadcrumb a:hover { text-decoration: underline; }

.prose { line-height: 1.65; color: var(--abyss); }
.prose--muted { color: var(--text-muted); }
.prose--sm { font-size: 0.85rem; }

/* Course grid */
.course-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

@media (min-width: 640px) {
  .course-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
  .course-grid { grid-template-columns: repeat(3, 1fr); }
}

.course-card {
  position: relative;
  padding: 0;
  background: var(--pearl);
  border-radius: 1rem;
  border: 1px solid rgba(3, 66, 109, 0.1);
  box-shadow: 0 4px 16px rgba(3, 66, 109, 0.06);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.course-card__media {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  flex-shrink: 0;
}

.course-card__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.course-card__body {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1.25rem 1.5rem 1.5rem;
  flex: 1;
}

.course-card__title {
  font-family: 'Josefin Sans', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 0;
  color: var(--blu-bleu);
}

.course-card__desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 0;
  flex: 1;
}

.course-card__progress {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 0;
}

.course-card__locked-text {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-style: italic;
  margin: 0;
}

.course-card--locked {
  opacity: 0.65;
  background: var(--mist);
}

.course-card__lock {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  color: var(--text-muted);
  line-height: 0;
}

/* Progress bar */
.progress-bar {
  height: 6px;
  background: var(--mist);
  border-radius: 3px;
  overflow: hidden;
}

.progress-bar__fill {
  height: 100%;
  background: linear-gradient(90deg, var(--blu-vert), var(--blu-bleu));
  border-radius: 3px;
  transition: width 0.4s ease;
}

/* Badges */
.badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
}

.badge--success { background: var(--foam); color: var(--blu-vert); }
.badge--score-pass { background: rgba(91, 148, 136, 0.18); color: #1f6e5f; }
.badge--score-fail { background: rgba(215, 76, 76, 0.14); color: #b33030; }

/* Chapters */
.chapter-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.chapter-item {
  padding: 1.25rem;
  background: var(--pearl);
  border-radius: 0.75rem;
  border: 1px solid rgba(3, 66, 109, 0.08);
}

.chapter-item--locked { opacity: 0.55; }

.chapter-item__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.35rem;
}

.chapter-item__num {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--blu-vert);
  font-weight: 600;
}

.chapter-item__title {
  font-size: 1.05rem;
  margin: 0 0 0.35rem;
  font-family: 'Josefin Sans', sans-serif;
  font-weight: 700;
}

.chapter-item__meta,
.chapter-item__locked {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0 0 0.75rem;
}

.chapter-item__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.exam-block {
  padding: 1.5rem;
  background: var(--foam);
  border-radius: 0.75rem;
  border: 1px solid rgba(91, 148, 136, 0.2);
}

.exam-block .heading-section {
  margin: 0 0 0.75rem;
  font-size: 1rem;
}

/* Page list */
.page-list {
  list-style: none;
  margin: 0 0 1.5rem;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.page-list__link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 1rem;
  min-height: 44px;
  background: var(--mist);
  border-radius: 0.5rem;
  transition: background 0.2s;
}

.page-list__link:hover { background: var(--foam); }
.page-list__link--done { border-left: 3px solid var(--blu-vert); }
.page-list__link--locked {
  opacity: 0.55;
  cursor: not-allowed;
}

.page-list__num {
  width: 1.75rem;
  height: 1.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--blu-bleu);
  color: var(--pearl);
  border-radius: 50%;
  font-size: 0.75rem;
  font-weight: 700;
  flex-shrink: 0;
}

.page-list__title { flex: 1; font-weight: 500; }
.page-list__check { color: var(--blu-vert); font-weight: 700; }

.chapter-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.chapter-actions__hint {
  font-size: 0.88rem;
  color: var(--text-muted);
  align-self: center;
}

.lesson-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

.lesson-sidebar {
  background: var(--mist);
  border: 1px solid rgba(3, 66, 109, 0.08);
  border-radius: 0.75rem;
  padding: 0.75rem;
}

.lesson-sidebar__accordion {
  margin: 0;
  padding: 0;
  border: 0;
}

.lesson-sidebar__toggle {
  list-style: none;
  cursor: pointer;
  margin: 0;
  width: 100%;
  min-height: 44px;
  border: 2px solid var(--blu-bleu);
  border-radius: 999px;
  background: linear-gradient(145deg, #f7fbfc 0%, #eef6f8 100%);
  color: var(--ocean);
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  text-align: center;
  padding: 0.65rem 1rem;
  font-size: 0.78rem;
  box-shadow: 0 6px 16px rgba(3, 66, 109, 0.12);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.lesson-sidebar__toggle::-webkit-details-marker {
  display: none;
}

.lesson-sidebar__toggle::after {
  content: "";
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 7px solid var(--blu-bleu);
  margin-left: 0.75rem;
  transition: transform 0.2s ease;
}

.lesson-sidebar__accordion[open] .lesson-sidebar__toggle::after {
  transform: rotate(180deg);
}

.lesson-sidebar__toggle:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(3, 66, 109, 0.18);
  background: linear-gradient(145deg, #f3f9fb 0%, #e7f2f6 100%);
}

.lesson-sidebar__toggle:focus-visible {
  outline: 2px solid var(--blu-vert);
  outline-offset: 2px;
}

.lesson-sidebar__content {
  margin-top: 0.75rem;
  padding: 0.35rem 0.35rem 0.15rem;
}

.lesson-sidebar__title {
  margin: 0 0 0.8rem;
  font-size: 0.95rem;
  color: var(--blu-bleu);
}

.lesson-sidebar__chapter { margin-bottom: 0.9rem; }
.lesson-sidebar__chapter:last-child { margin-bottom: 0; }
.lesson-sidebar__chapter--locked { opacity: 0.55; }
.lesson-sidebar__chapter-title {
  margin: 0 0 0.35rem;
  font-size: 0.8rem;
  font-weight: 700;
}

.lesson-sidebar__chapter--current .lesson-sidebar__chapter-title {
  color: var(--blu-bleu);
}

.lesson-sidebar__pages {
  list-style: none;
  margin: 0;
  padding: 0;
}

.lesson-sidebar__page {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.4rem 0.45rem;
  border-radius: 0.35rem;
  font-size: 0.8rem;
  border-left: 3px solid transparent;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.lesson-sidebar__page:hover {
  background: rgba(91, 148, 136, 0.2);
  border-left-color: var(--blu-vert);
}

.lesson-sidebar__page.is-current {
  background: rgba(3, 66, 109, 0.2);
  border-left-color: var(--blu-bleu);
  color: var(--volcanic);
  font-weight: 700;
}

.lesson-sidebar__page.is-current .done {
  color: var(--blu-bleu);
}
.lesson-sidebar__page.is-locked { color: var(--text-muted); display: block; }
.lesson-sidebar__page .done { color: var(--blu-vert); font-weight: 700; }

@media (min-width: 1024px) {
  .lesson-layout {
    grid-template-columns: 19rem minmax(0, 1fr);
    align-items: start;
  }
  .lesson-sidebar__accordion { display: block; }
  .lesson-sidebar__accordion[open] .lesson-sidebar__content,
  .lesson-sidebar__content { display: block; margin-top: 0; padding-top: 0; }
  .lesson-sidebar__toggle { display: none; }
  .lesson-sidebar {
    position: sticky;
    top: 6rem;
    max-height: calc(100vh - 7rem);
    overflow: auto;
  }
}

@media (max-width: 1023px) {
  .lesson-sidebar__accordion:not([open]) .lesson-sidebar__content { display: none; }
  .lesson-layout { gap: 0.75rem; }
  .lesson-sidebar { padding-top: 0.55rem; }
}

/* Lesson page */
.lesson-page__head { margin-bottom: 1.5rem; }

.lesson-page__meta {
  font-size: 0.8rem;
  color: var(--blu-vert);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 0 0 0.5rem;
}

.lesson-page__title {
  font-size: clamp(1.35rem, 4vw, 2rem);
  margin: 0;
}

.lesson-page__media { margin: 0 0 1.5rem; }

.lesson-page__image {
  width: 100%;
  border-radius: 0.75rem;
  max-height: 16rem;
  object-fit: cover;
  margin: 0 auto;
  display: block;
}

.lesson-page__body { margin-bottom: 1.5rem; font-size: 1rem; }
.lesson-page__body p { margin: 0 0 1rem; }
.lesson-page__body p:last-child { margin-bottom: 0; }
.lesson-page__body ul,
.lesson-page__body ol {
  margin: 0 0 1rem;
  padding-left: 1.35rem;
}
.lesson-page__body li { margin-bottom: 0.45rem; }
.lesson-page__body li:last-child { margin-bottom: 0; }
.lesson-page__block-title {
  margin: 1.75rem 0 0.75rem;
  font-size: clamp(1rem, 3vw, 1.35rem);
}

.video-wrap {
  position: relative;
  aspect-ratio: 16 / 9;
  margin-bottom: 1.5rem;
  border-radius: 0.75rem;
  overflow: hidden;
  background: #000;
}

.video-wrap iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.lesson-nav {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  padding-top: 1rem;
  border-top: 1px solid var(--silver);
}

@media (max-width: 639px) {
  .lesson-nav {
    position: sticky;
    bottom: 0;
    background: var(--pearl);
    padding: 1rem 0;
    margin: 0 -1rem;
    padding-left: 1rem;
    padding-right: 1rem;
    box-shadow: 0 -4px 16px rgba(3, 66, 109, 0.06);
  }
}

/* Quiz */
.section--quiz { padding-bottom: 5rem; }

.quiz-form { margin-bottom: 2rem; }

.quiz-progress {
  margin-bottom: 1.5rem;
}

.quiz-progress span {
  display: block;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.quiz-question {
  border: none;
  margin: 0 0 1.5rem;
  padding: 0;
}

.quiz-question--hidden { display: none; }

.quiz-question__text {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 1rem;
  line-height: 1.5;
  color: var(--abyss);
}

.quiz-choices {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}

.quiz-choice {
  display: block;
  cursor: pointer;
}

.quiz-choice__input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.quiz-choice__label {
  display: block;
  padding: 0.875rem 1rem;
  min-height: 44px;
  background: #ffffff;
  border: 2px solid rgba(3, 66, 109, 0.22);
  border-radius: 0.5rem;
  font-size: 0.95rem;
  color: var(--volcanic);
  box-shadow: 0 2px 8px rgba(3, 66, 109, 0.06);
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}

.quiz-choice__input:checked + .quiz-choice__label {
  border-color: var(--blu-bleu);
  background: rgba(91, 148, 136, 0.16);
  box-shadow: 0 6px 16px rgba(3, 66, 109, 0.12);
  font-weight: 600;
}

.quiz-choice:hover .quiz-choice__label {
  border-color: rgba(3, 66, 109, 0.45);
  background: #f9fcfd;
}

.quiz-choice__input:focus-visible + .quiz-choice__label {
  outline: 2px solid var(--blu-bleu);
  outline-offset: 2px;
}

.quiz-nav {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.poc-simulate {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px dashed var(--silver);
}

.sticky-actions {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 0.75rem 1rem;
  background: var(--pearl);
  border-top: 1px solid var(--silver);
  box-shadow: 0 -4px 20px rgba(3, 66, 109, 0.08);
  z-index: 50;
}

@media (max-width: 639px) {
  .sticky-actions { display: block; }
  .quiz-nav .btn--primary:not(.quiz-submit) { display: none; }
}

/* Quiz results */
.quiz-results {
  text-align: center;
  padding: 1.5rem 0;
}

.quiz-results__score {
  margin-bottom: 1.5rem;
}

.quiz-results__percent {
  display: block;
  font-size: clamp(2.5rem, 10vw, 4rem);
  font-weight: 700;
  font-family: 'Josefin Sans', sans-serif;
  color: var(--blu-bleu);
  line-height: 1;
}

.quiz-results__label {
  margin: 0.5rem 0 0;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.quiz-results--pass .quiz-results__percent { color: var(--blu-vert); }
.quiz-results--fail .quiz-results__percent { color: #c0392b; }

.quiz-errors {
  text-align: left;
  margin: 1.5rem 0;
}

.quiz-error {
  padding: 1rem;
  margin-bottom: 0.75rem;
  background: #fef5f5;
  border-left: 3px solid #e74c3c;
  border-radius: 0 0.5rem 0.5rem 0;
  font-size: 0.9rem;
}

.quiz-error__q { font-weight: 600; margin: 0 0 0.35rem; }
.quiz-error__exp { margin: 0; color: var(--text-muted); }

.quiz-results__actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  align-items: center;
}

@media (min-width: 640px) {
  .quiz-results__actions { flex-direction: row; justify-content: center; }
}

/* Certificate */
.certificate-card {
  padding: 1.25rem;
  background: linear-gradient(180deg, #fafdff 0%, #f3f8fa 100%);
  border-radius: 1.25rem;
  border: 1px solid rgba(3, 66, 109, 0.14);
  box-shadow: 0 14px 34px rgba(3, 66, 109, 0.12);
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.certificate-card__main {
  background: var(--pearl);
  border: 1px solid rgba(3, 66, 109, 0.08);
  border-radius: 1rem;
  padding: 1.25rem;
}

.certificate-card__eyebrow {
  margin: 0.2rem 0 0.5rem;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--blu-vert);
  font-weight: 700;
}

.certificate-card__badge {
  width: 3.3rem;
  height: 3.3rem;
  margin: 0 0 0.75rem;
  background: var(--blu-vert);
  color: var(--pearl);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  font-weight: 700;
}

.certificate-card__title {
  margin: 0 0 0.8rem;
  font-size: clamp(1.9rem, 8vw, 3.4rem);
  line-height: 0.95;
}

.certificate-card__text {
  margin-bottom: 1.2rem;
  max-width: 33rem;
}

.certificate-card__meta {
  display: grid;
  gap: 0.35rem;
  margin-bottom: 1.2rem;
}

.certificate-card__meta-line {
  margin: 0;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.84rem;
}

.certificate-card__meta-line span { color: var(--text-muted); }

.certificate-card__qr-panel {
  background: var(--mist);
  border: 1px solid rgba(3, 66, 109, 0.1);
  border-radius: 1rem;
  padding: 1rem;
  text-align: center;
}

.certificate-card__qr {
  margin: 0 auto 0.75rem;
  padding: 0.9rem;
  background: #fff;
  border-radius: 0.75rem;
  border: 1px solid rgba(3, 66, 109, 0.1);
  max-width: 13rem;
}

.certificate-card__qr canvas {
  display: block;
  margin: 0 auto;
}

.certificate-card__verify code {
  font-size: 0.74rem;
  background: var(--pearl);
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  border: 1px dashed rgba(3, 66, 109, 0.24);
}

.certificate-card__actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  align-items: center;
}

.certificate-card__actions .btn {
  white-space: nowrap;
}

@media (max-width: 639px) {
  .certificate-card {
    padding: 0.9rem;
  }

  .certificate-card__main,
  .certificate-card__qr-panel {
    padding: 1rem;
  }

  .certificate-card__meta-line {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.2rem;
  }

  .certificate-card__meta-line strong {
    max-width: 100%;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .certificate-card__actions {
    align-items: stretch;
  }

  .certificate-card__actions .btn {
    width: 100%;
    text-align: center;
    white-space: normal;
  }

  .certificate-card__cta {
    min-width: 0;
  }

  .certificate-card__qr {
    max-width: 100%;
  }
}

@media (min-width: 640px) {
  .certificate-card {
    grid-template-columns: minmax(0, 1fr) 14rem;
    align-items: stretch;
    gap: 1rem;
    padding: 1rem;
  }
  .certificate-card__main { padding: 2rem; }
  .certificate-card__title { font-size: clamp(2.2rem, 5vw, 4.1rem); }
  .certificate-card__actions { flex-direction: row; justify-content: flex-start; flex-wrap: wrap; }
  .certificate-card__cta { min-width: 22rem; }
  .certificate-card__qr-panel { display: flex; flex-direction: column; justify-content: center; }
}

/* Extra button variants */
.btn--block { width: 100%; }
.btn--lg { padding: 0.875rem 1.75rem; font-size: 1rem; min-height: 48px; }
.btn--ghost {
  background: transparent;
  color: var(--text-muted);
  border: 1px dashed var(--silver);
}
.btn--ghost:hover { background: var(--mist); color: var(--abyss); }

.btn--outline {
  background: transparent;
  color: var(--blu-bleu);
  border: 2px solid var(--blu-bleu);
}
.btn--outline:hover { background: var(--foam); }

/* ─── Blu Plongeur — Wizard formulaire ─────────────── */

.container--narrow { max-width: 42rem; }

.wizard-card {
  background: #fff;
  border-radius: 1rem;
  padding: 1.25rem;
  box-shadow: 0 4px 24px rgba(3, 66, 109, 0.08);
  border: 1.5px solid #b8ccd4;
}

@media (min-width: 640px) {
  .wizard-card { padding: 2rem; }
}

.wizard-progress { margin-bottom: 1.75rem; }

.wizard-progress__header {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-bottom: 0.75rem;
}

.wizard-progress__label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--turquoise);
}

.wizard-progress__title {
  font-family: 'Josefin Sans', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--abyss);
}

.wizard-step--hidden { display: none; }

.wizard-step__heading {
  font-family: 'Josefin Sans', sans-serif;
  font-size: 1.25rem;
  margin: 0 0 1.25rem;
  color: var(--abyss);
}

.form-grid {
  display: grid;
  gap: 1rem;
}

@media (min-width: 640px) {
  .form-grid { grid-template-columns: 1fr 1fr; }
}

.form-field--full { grid-column: 1 / -1; }

.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23022538' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  padding-right: 2rem;
  cursor: pointer;
}

.phone-row {
  display: grid;
  grid-template-columns: 7rem 1fr;
  gap: 0.5rem;
}

.phone-code { font-size: 0.85rem; padding-left: 0.5rem; padding-right: 1.5rem; }

.form-hint {
  margin: 0.35rem 0 0;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.form-error {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.8rem;
  color: #c0392b;
  min-height: 1rem;
}

.form-error:empty { display: none; }

.required { color: #c0392b; }

.form-input.is-invalid {
  border-color: #c0392b;
  box-shadow: 0 0 0 2px rgba(192, 57, 43, 0.15);
}

.wizard-nav {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--silver);
}

.wizard-nav .btn { min-height: 48px; flex: 1; }
.wizard-nav .btn[hidden] { display: none !important; }
.wizard-nav .btn--primary { margin-left: auto; max-width: 14rem; }

/* Welcome page */
.welcome-card__why { margin: 1.5rem 0; text-align: left; }

.auth-card .hero__eyebrow {
  color: #b8e8de;
}

.auth-card .welcome-card__why-title {
  color: #b8e8de;
}

.welcome-card__why-title {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--turquoise);
  margin: 0 0 0.75rem;
}

.auth-card .welcome-card__list {
  color: rgba(255, 255, 255, 0.95);
}

.welcome-card__list {
  margin: 0;
  padding-left: 1.25rem;
  color: var(--text-muted);
  line-height: 1.7;
}

.info-banner {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  background: #ffffff;
  border: 1.5px solid #b8ccd4;
  border-radius: 0.75rem;
  padding: 1rem;
  margin-bottom: 1.5rem;
  text-align: left;
}

.info-banner--health { margin-bottom: 1rem; }

.info-banner__icon {
  width: 1.5rem;
  height: 1.5rem;
  flex-shrink: 0;
  color: var(--turquoise);
  margin-top: 0.1rem;
}

.info-banner__title {
  margin: 0 0 0.25rem;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--abyss);
}

.info-banner__text {
  margin: 0;
  font-size: 0.85rem;
  color: var(--volcanic);
  line-height: 1.5;
}

.health-mechanism {
  background: #fff;
  border: 1.5px dashed #7a9aad;
  border-radius: 0.75rem;
  padding: 1rem;
  margin-bottom: 1.25rem;
}

.health-mechanism__title {
  margin: 0 0 0.5rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--abyss);
}

.health-mechanism__list {
  margin: 0;
  padding-left: 1.1rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.health-questions { display: flex; flex-direction: column; gap: 1rem; }

.health-question {
  padding: 1rem;
  background: var(--mist);
  border-radius: 0.75rem;
  border: 1.5px solid #b8ccd4;
}

.health-question__label {
  display: block;
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 0.75rem;
  color: var(--abyss);
}

.radio-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

.radio-option { position: relative; }

.radio-option input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.radio-option span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.5rem 1rem;
  border: 2px solid #7a9aad;
  border-radius: 0.5rem;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  background: #fff;
  color: var(--volcanic);
}

.radio-option input:checked + span {
  border-color: var(--blu-bleu);
  background: var(--foam);
  color: var(--volcanic);
}

.radio-option input:focus-visible + span {
  outline: 2px solid var(--turquoise);
  outline-offset: 2px;
}

.health-outcome {
  margin-top: 1.25rem;
  padding: 1rem;
  border-radius: 0.75rem;
}

.health-outcome--honor {
  background: #edf7f4;
  border: 1px solid var(--turquoise);
}

.health-outcome--cert {
  background: #fdf3f0;
  border: 1px solid #e8b4a8;
}

.health-outcome__title {
  margin: 0 0 0.5rem;
  font-size: 0.95rem;
  font-weight: 600;
}

.health-outcome__text {
  margin: 0 0 0.75rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.form-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  cursor: pointer;
  font-size: 0.9rem;
  line-height: 1.5;
  margin-bottom: 0.75rem;
  color: var(--volcanic);
}

.form-checkbox input {
  width: 1.25rem;
  height: 1.25rem;
  margin-top: 0.15rem;
  flex-shrink: 0;
  accent-color: var(--blu-bleu);
}

.form-checkbox--optional { opacity: 0.9; }

.form-checkbox a { color: var(--blu-bleu); text-decoration: underline; font-weight: 600; }
.form-checkbox a:hover { color: var(--blu-vert); }

.upload-zone {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 1.5rem;
  border: 2px dashed #7a9aad;
  border-radius: 0.75rem;
  cursor: pointer;
  text-align: center;
  transition: border-color 0.15s, background 0.15s;
  min-height: 120px;
  justify-content: center;
  background: #fff;
}

.upload-zone:hover,
.upload-zone:focus-within {
  border-color: var(--blu-bleu);
  background: var(--foam);
}

.upload-zone__icon { font-size: 2rem; }

.upload-zone__label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--abyss);
}

.upload-zone__filename {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.legal-scroll {
  max-height: 220px;
  overflow-y: auto;
  padding: 1rem;
  background: var(--mist);
  border: 1.5px solid #b8ccd4;
  border-radius: 0.75rem;
  font-size: 0.8rem;
  line-height: 1.6;
  color: var(--volcanic);
  margin-bottom: 1.25rem;
  white-space: pre-line;
}

.consent-block { margin-bottom: 1.5rem; }

.signature-block__title {
  margin: 0 0 0.5rem;
  font-size: 0.95rem;
  font-weight: 600;
}

.signature-block__hint {
  margin: 0 0 0.75rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.signature-pad-wrap.is-disabled .signature-pad {
  cursor: not-allowed;
}

.signature-pad-wrap.is-disabled {
  opacity: 0.55;
}

.signature-pad-wrap.is-disabled::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 2;
  cursor: not-allowed;
}

.signature-pad-wrap {
  position: relative;
  border: 2px solid #7a9aad;
  border-radius: 0.75rem;
  overflow: hidden;
  background: #fff;
  touch-action: none;
}

.signature-pad {
  display: block;
  width: 100%;
  height: 200px;
  cursor: crosshair;
}

.signature-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 0.75rem;
  flex-wrap: wrap;
}

.signature-timestamp {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.confirm-success {
  text-align: center;
  margin-bottom: 1.5rem;
}

.confirm-success__icon {
  width: 3.5rem;
  height: 3.5rem;
  margin: 0 auto 1rem;
  background: var(--turquoise);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  font-weight: 700;
}

.confirm-success__text {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

.recap-summary {
  background: var(--mist);
  border-radius: 0.75rem;
  padding: 1rem;
  margin-bottom: 1.5rem;
}

.recap-section { margin-bottom: 1rem; }
.recap-section:last-child { margin-bottom: 0; }

.recap-section__title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--turquoise);
  margin: 0 0 0.5rem;
}

.recap-row {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.85rem;
  padding: 0.25rem 0;
  border-bottom: 1px solid #e0eaed;
}

.recap-row:last-child { border-bottom: none; }

.recap-row__key { color: var(--text-muted); flex-shrink: 0; }
.recap-row__val { text-align: right; font-weight: 500; }

.privacy-page { padding-bottom: 2rem; }

.privacy-page__back {
  display: inline-block;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  color: var(--turquoise);
}

.privacy-section { margin-bottom: 1.5rem; }

.privacy-section__title {
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 0.5rem;
  color: var(--abyss);
}

.privacy-section__text {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--text-muted);
}

.validation-card {
  background: #fff;
  border-radius: 1rem;
  padding: 2rem;
  text-align: center;
  box-shadow: 0 4px 24px rgba(3, 66, 109, 0.08);
  border: 1px solid #d7e6ea;
}

.validation-card__ref {
  font-size: 1.1rem;
  margin: 1rem 0;
}

.validation-card__text {
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.badge {
  display: inline-block;
  padding: 0.35rem 0.75rem;
  border-radius: 2rem;
  font-size: 0.8rem;
  font-weight: 600;
}

.badge--pending {
  background: #fef3e0;
  color: #b8860b;
}

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

.alert {
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.alert--error {
  background: #fdf0ee;
  color: #c0392b;
  border: 1px solid #e8b4a8;
}

.alert--success {
  background: #edf7f4;
  color: #2d6a5a;
  border: 1px solid var(--turquoise);
}

