/* =========================
   RESET + BASE
========================= */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "Manrope", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background-color: #ffffff;
  color: #222;
  line-height: 1.5;
  padding: 2rem 1.5rem 3rem;
}

/* =========================
   EN-TÊTE
========================= */
header {
  text-align: center;
  margin-bottom: 1.8rem;
}

h1 {
  font-size: 2rem;
  margin-bottom: 0.3rem;
  font-weight: 600;
}

.subtitle {
  font-size: 0.95rem;
  color: #666;
}

/* =========================
   BOUTON RETOUR
========================= */
.back-portfolio {
  text-align: left;
  margin-bottom: 1.8rem;
  max-width: 1100px;
  margin-left: auto;
  margin-right: auto;
}

.back-portfolio a {
  font-size: 0.9rem;
  text-decoration: none;
  color: #3a3a3c;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid #e5e5e5;
  background-color: #ffffff;
  transition: background 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease, color 0.2s ease;
}

.back-portfolio a:hover {
  background-color: #f3f4f6;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.06);
  transform: translateY(-1px);
  color: #111;
}

/* =========================
   CONTENEUR PRINCIPAL
========================= */
.page-wrapper {
  max-width: 1100px;
  margin: 0 auto;
}

.intro-text {
  margin-bottom: 1.8rem;
  font-size: 0.98rem;
  color: #444;
}

/* =========================
   VIDÉO
========================= */
.video-container {
  display: flex;
  justify-content: center;
  margin-bottom: 1.8rem;
}

.video-wrapper {
  background-color: #fafafa;
  border-radius: 18px;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.08);
  padding: 1rem;
  border: 1px solid #e5e5e5;
  width: 100%;
  max-width: 900px;
}

/* ✅ conteneur uniquement pour la vidéo */
.video-stage {
  position: relative;
}

video {
  width: 100%;
  border-radius: 14px;
  display: block;
}

/* =========================
   OVERLAY SUR LA VIDEO (bouton timed)
========================= */
.timed-overlays {
  position: absolute;
  inset: 0;                 /* couvre pile la vidéo */
  border-radius: 14px;      /* même arrondi que la vidéo */
  overflow: hidden;
  pointer-events: none;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0 1rem 1rem;     /* marge bas */
}

.timed-btn {
  display: none;
  pointer-events: auto;
}

/* même design, légèrement compact */
.timed-btn.action-btn {
  font-size: 0.88rem;
  padding: 0.55rem 1.05rem;
}

/* =========================
   BOUTONS SOUS LA VIDÉO
========================= */
.video-controls {
  margin-top: 1.4rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.8rem;
}

.action-btn {
  padding: 0.6rem 1.2rem;
  border-radius: 999px;
  border: 1px solid #d9b6cf;
  background: #ffffff;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 500;
  color: #7a5c75;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
  transition: background 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.action-btn:hover {
  background: #f9e9f3;
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.08);
}

.action-btn:active {
  transform: translateY(0);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.06);
}

/* =========================
   PANNEAU D’INFO
========================= */
.info-panel {
  max-width: 900px;
  margin: 2rem auto 0;
  background-color: #ffffff;
  border-radius: 16px;
  border: 1px solid #e5e5e5;
  padding: 1rem 1.2rem;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.06);
  font-size: 0.95rem;
  color: #555;
}

.info-panel strong {
  color: #c47cb0;
  font-weight: 600;
}

/* =========================
   QUIZ (OVERLAY + MODAL)
========================= */
.quiz-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.38);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  z-index: 999;
}

.quiz-overlay.is-open {
  display: flex;
}

.quiz-modal {
  width: 100%;
  max-width: 760px;
  background: #ffffff;
  border-radius: 18px;
  border: 1px solid #e5e5e5;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.18);
  padding: 1.2rem 1.2rem 1.4rem;
}

.quiz-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.6rem;
}

.quiz-header h2 {
  font-size: 1.25rem;
  font-weight: 650;
  color: #222;
}

.quiz-close {
  border: 1px solid #e5e5e5;
  background: #ffffff;
  border-radius: 999px;
  padding: 0.45rem 0.7rem;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.15s ease;
}

.quiz-close:hover {
  background: #f3f4f6;
  transform: translateY(-1px);
}

.quiz-desc {
  font-size: 0.95rem;
  color: #555;
  margin-bottom: 1.1rem;
}

/* =========================
   QUIZ (FORM + QUESTIONS)
========================= */
.quiz-form {
  display: grid;
  gap: 1rem;
}

.quiz-q {
  border: 1px solid #f0d7e8;
  background: #fff7fb;
  border-radius: 18px;
  padding: 1.5rem 1.6rem;
  margin: 0;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.quiz-question {
  font-weight: 600;
  color: #4a3b46;
  line-height: 1.5;
  font-size: 1rem;
  margin-bottom: 1rem;
}

.quiz-choices {
  display: flex;
  gap: 1.6rem;
  align-items: center;
  flex-wrap: wrap;
}

.quiz-choices label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: #4a3b46;
  font-size: 0.98rem;
}

.quiz-q input[type="radio"] {
  width: 18px;
  height: 18px;
}

/* =========================
   ACTIONS (VALIDER / REPRENDRE)
========================= */
.quiz-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  justify-content: flex-end;
  margin-top: 0.2rem;
}

.quiz-validate,
.quiz-resume {
  padding: 0.6rem 1.2rem;
  border-radius: 999px;
  border: 1px solid #d9b6cf;
  background: #ffffff;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
  color: #7a5c75;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
  transition: background 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
}

.quiz-validate:hover,
.quiz-resume:hover {
  background: #f9e9f3;
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.08);
}

.quiz-result {
  margin-top: 0.1rem;
  font-size: 0.95rem;
  color: #444;
}

/* =========================
   MOBILE
========================= */
@media (max-width: 640px) {
  body {
    padding: 1.5rem 1rem 2.5rem;
  }

  h1 {
    font-size: 1.6rem;
  }

  .action-btn,
  .quiz-validate,
  .quiz-resume {
    width: 100%;
  }

  .quiz-actions {
    justify-content: stretch;
  }

  .quiz-modal {
    padding: 1rem;
  }

  .timed-overlays {
    padding: 0 0.8rem 0.8rem;
  }

  .timed-btn.action-btn {
    width: 100%;
  }
}
