/* A story episode is taught in two lessons, each with three study stages. */
.lesson-title { text-wrap: balance; }
.fp-path { margin: 1.5rem 0 2.5rem; }
.fp-path-heading { font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; color: #84582a; font-weight: 700; }
.fp-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin: .8rem 0 1rem; }
.fp-card { padding: 1.4rem; border: 1px solid #ded0c5; border-radius: 14px; background: #fff; text-decoration: none; color: #4a2636; }
.fp-card:hover { border-color: #a94a3b; background: #fffdfa; }
.fp-card span, .fp-card strong, .fp-card small { display: block; }
.fp-card span { font-size: .78rem; font-weight: 700; color: #84582a; margin-bottom: .45rem; }
.fp-card strong { font: 600 1.45rem/1.3 'Cormorant Garamond', Georgia, serif; }
.fp-card small { color: #65545b; line-height: 1.55; margin-top: .6rem; font-size: .88rem; }
.fp-tools { display: flex; align-items: center; flex-wrap: wrap; gap: .65rem 1.2rem; font-size: .85rem; color: #65545b; }
.fp-tools button, .fp-next { border: 1px solid #d6c6b8; border-radius: 8px; background: #fff; padding: .65rem .9rem; color: #4a2636; cursor: pointer; font: 600 .88rem/1.3 'Manrope', sans-serif; text-decoration: none; }
.fp-tools a { color: #65545b; text-underline-offset: 3px; }
.fp-lesson { margin: 3rem 0; scroll-margin-top: 100px; }
.fp-lesson-head { padding: 1.6rem; border-radius: 14px; background: #4a2636; color: white; margin-bottom: 1rem; }
.fp-lesson-head small { color: #e6cfa4; font-weight: 600; letter-spacing: .06em; }
.fp-lesson-head h2 { font: 500 1.7rem/1.35 'Cormorant Garamond', Georgia, serif; margin: .6rem 0; color: #fff; }
.fp-lesson-head p { margin: 0; line-height: 1.65; color: #eadde2; }
.fp-outcomes { padding: 1.25rem 1.5rem; margin: 1rem 0 1.4rem; border: 1px solid #ded0c5; border-radius: 12px; background: #fffdfa; color: #392f32; }
.fp-outcomes h3 { margin: 0 0 .8rem; font: 600 1.15rem/1.45 'Cormorant Garamond', Georgia, serif; color: #4a2636; }
.fp-outcomes .fp-focus { margin: 0 0 1rem; color: #65545b; font-size: .88rem; line-height: 1.65; }
.fp-outcomes ul, .fp-self-check ul { margin: .6rem 0 0; padding-left: 1.25rem; }
.fp-outcomes li, .fp-self-check li { line-height: 1.65; padding-left: .2rem; }
.fp-outcomes li + li, .fp-self-check li + li { margin-top: .75rem; }
.fp-outcome-label { display: block; color: #84582a; font-size: .72rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; margin-bottom: .1rem; }
.fp-self-check > p { margin: 1rem 0 0; font-size: .85rem; }
.fp-stage-links { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: 1.2rem; }
.fp-stage-links a { color: #fff; border: 1px solid #8a6676; border-radius: 30px; font-size: .85rem; text-decoration: none; padding: .5rem .8rem; }
.fp-stage-links a:hover { background: #61394b; }
.fp-stage { border: 1px solid #ded0c5; border-radius: 12px; margin: .85rem 0; background: #fff; scroll-margin-top: 100px; }
.fp-stage > summary { display: flex; align-items: center; gap: .8rem; list-style: none; cursor: pointer; padding: 1.1rem 1.3rem; color: #4a2636; }
.fp-stage > summary::-webkit-details-marker { display: none; }
.fp-stage > summary::after { content: '+'; margin-left: auto; font-size: 1.5rem; font-weight: 400; }
.fp-stage[open] > summary::after { content: '−'; }
.fp-stage-number { width: 2rem; height: 2rem; display: grid; place-items: center; border-radius: 50%; background: #f3e8e1; color: #84582a; font-weight: 700; flex-shrink: 0; }
.fp-stage-title { font-weight: 700; }
.fp-stage-time { font-size: .8rem; color: #65545b; margin-left: auto; white-space: nowrap; }
.fp-stage[open] > summary { border-bottom: 1px solid #ebe1d8; }
.fp-stage-content { padding: 1.25rem; min-width: 0; }
.fp-stage-content > :first-child { margin-top: 0; }
.fp-stage-content > .theory, .fp-stage-content > .exercise { margin: 1.2rem 0; }
.fp-stage-content > .theory { padding: 1.1rem; }
.fp-stage-content .fr-text { padding: 1.2rem; }
.fp-stage-content p, .fp-stage-content li { line-height: 1.65; }
.fp-stage-content ol, .fp-stage-content ul:not(.sentence-list) { padding-left: 1.4rem; }
.fp-stage-content li + li { margin-top: .45rem; }
.fp-stage-content h3 { color: #4a2636; font: 600 1.2rem/1.4 'Cormorant Garamond', Georgia, serif; }
.fp-task { padding: 1.2rem; border-left: 3px solid #c9973a; background: #f6efe9; border-radius: 0 10px 10px 0; margin: 1.2rem 0; }
.fp-task h3 { margin-top: 0; }
.fp-kicker { display: inline-block; text-transform: uppercase; font-size: .7rem; letter-spacing: .1em; font-weight: 700; color: #84582a; margin-bottom: .3rem; }
.fp-success { padding: .9rem 1.1rem; background: #edf4ef; border-radius: 9px; color: #244e38; margin: 1.2rem 0; }
.fp-success p { margin: .3rem 0; }
.fp-complete { display: flex; align-items: center; gap: .7rem; border-top: 1px solid #ebe1d8; padding-top: 1rem; margin-top: 1.5rem; font-size: .88rem; color: #65545b; cursor: pointer; }
.fp-complete input { width: 19px; height: 19px; accent-color: #526e57; flex-shrink: 0; }
.fp-next { display: inline-block; margin-top: 1rem; }
.fp-translation { margin: .8rem 0 1.4rem; color: #65545b; font-size: .9rem; }
.fp-translation summary, .fp-extra > summary { cursor: pointer; font-weight: 600; padding: .6rem 0; color: #65545b; }
.fp-extra { border-top: 1px solid #ebe1d8; margin-top: 1.2rem; padding-top: .6rem; }
.fp-role-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: .7rem; margin: 1rem 0; }
.fp-role { background: #fff; border: 1px solid #ded0c5; border-radius: 10px; padding: .9rem; }
.fp-role strong { display: block; color: #4a2636; margin-bottom: .4rem; }
.fp-stage-content .fp-reference-table { overflow-x: auto; }
.fp-lesson .gi-table, .fp-reference .gi-table { display: block; max-width: 100%; overflow-x: auto; }
.fp-lesson .ls-grid, .fp-lesson .vocab-cards-grid { grid-template-columns: repeat(auto-fit, minmax(min(215px, 100%), 1fr)) !important; }
.fp-lesson .quiz-input { max-width: 100%; }
.fp-reference { margin: 2rem 0; scroll-margin-top: 100px; }
.fp-reference > summary { cursor: pointer; color: #4a2636; padding: 1rem; background: #f3e8e1; border-radius: 9px; font-weight: 600; }
.fp-reference > div { padding: 1rem; }
.fp-path a:focus-visible, .fp-stage summary:focus-visible, .fp-lesson a:focus-visible, .fp-tools button:focus-visible { outline: 3px solid #c9973a; outline-offset: 4px; }
.fp-stage [id] { scroll-margin-top: 105px; }
/* Before class: a three-question check after the reading. The explanation
   appears once the learner has found the right answer. */
.fp-precheck { border-top: 4px solid #c9973a; }
.fp-precheck .fp-why { display: none; margin: .45rem 0 0; color: #e6cfa4; font-size: .92rem; }
.fp-precheck .fp-why b { color: #fff; }
.fp-precheck .quiz-item:has(button.correct) .fp-why { display: block; }
/* In class: the minute-by-minute plan */
ol.fp-timeline { list-style: none; padding: 0; margin: 1rem 0 1.4rem; border-left: 2px solid #e4d6c9; }
.fp-timeline li { display: flex; gap: .9rem; align-items: baseline; padding: .55rem 0 .55rem 1rem; position: relative; }
.fp-timeline li + li { margin-top: 0; border-top: 1px solid #efe6de; }
.fp-timeline li::before { content: ''; position: absolute; left: -6px; top: 1.05rem; width: 10px; height: 10px; border-radius: 50%; background: #c9973a; }
.fp-time { flex: 0 0 4.2rem; font-size: .8rem; font-weight: 700; color: #84582a; background: #f3e8e1; border-radius: 20px; padding: .2rem .5rem; text-align: center; white-space: nowrap; }
.fp-retell .fp-role { font-size: .92rem; line-height: 1.55; color: #65545b; }
.fp-retell .fp-role b { color: #a94a3b; }
/* In class: speaking parts built on the story */
.fp-talk { margin: 1.6rem 0; padding: 1.3rem 1.4rem; border: 1px solid #ded0c5; border-radius: 14px; background: #fffdfa; }
.fp-talk h3 { margin: .1rem 0 .4rem; }
.fp-talk h4 { margin: 1.2rem 0 .5rem; font: 700 .78rem/1.4 'Manrope', sans-serif; letter-spacing: .08em; text-transform: uppercase; color: #84582a; }
.fp-qs { display: grid; gap: .45rem; }
.fp-q { background: #fff; border: 1px solid #e7dcd2; border-radius: 10px; }
.fp-q > summary { list-style: none; cursor: pointer; padding: .7rem .9rem; display: flex; align-items: center; gap: .8rem; font: 500 1.02rem/1.45 'Cormorant Garamond', Georgia, serif; color: #4a2636; }
.fp-q > summary::-webkit-details-marker { display: none; }
.fp-q > summary::after { content: 'Réponse'; margin-left: auto; flex-shrink: 0; font: 600 .72rem/1 'Manrope', sans-serif; color: #84582a; border: 1px solid #e4d6c9; border-radius: 20px; padding: .3rem .55rem; }
.fp-q[open] > summary::after { content: 'Masquer'; }
.fp-q > p { margin: 0; padding: 0 .9rem .75rem; color: #2f6b47; font-weight: 600; }
.fp-q > summary:focus-visible, .fp-flip-btn:focus-visible { outline: 3px solid #c9973a; outline-offset: 2px; }
.fp-photo-q { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 1.1rem; align-items: start; }
.fp-photo-q figure { margin: 0; }
.fp-photo-q img { width: 100%; height: auto; border-radius: 12px; display: block; }
/* Memory game: look at the photo, turn it over, answer from memory */
.fp-flip-grid { display: grid; gap: 1.2rem; max-width: 760px; }
.fp-flip { perspective: 1400px; }
.fp-flip-inner { display: grid; transition: transform .6s cubic-bezier(.3,.7,.3,1); transform-style: preserve-3d; }
.fp-flip.is-flipped .fp-flip-inner { transform: rotateY(180deg); }
.fp-flip-face { grid-area: 1 / 1; backface-visibility: hidden; -webkit-backface-visibility: hidden; border-radius: 14px; overflow: hidden; display: flex; flex-direction: column; }
.fp-flip-front { background: #4a2636; }
.fp-flip-front img { width: 100%; flex: 1; min-height: 0; object-fit: contain; display: block; }
.fp-flip-back { transform: rotateY(180deg); background: #4a2636; color: #fff; padding: 1.1rem 1.2rem; }
.fp-flip-back .fp-kicker { color: #e6cfa4; }
.fp-flip-list { margin: .3rem 0 .8rem; padding-left: 1.3rem; font: 500 1rem/1.5 'Cormorant Garamond', Georgia, serif; }
.fp-flip-list li + li { margin-top: .4rem; }
.fp-flip-answers { margin-top: auto; border-top: 1px solid rgba(255,255,255,.18); padding-top: .5rem; font-size: .9rem; }
.fp-flip-answers summary { cursor: pointer; color: #e6cfa4; font-weight: 600; }
.fp-flip-answers ol { margin: .5rem 0 0; padding-left: 1.3rem; color: #c9e8d4; }
.fp-flip-btn { border: 0; background: #c9973a; color: #4a2636; font: 700 .88rem/1 'Manrope', sans-serif; padding: .85rem 1rem; cursor: pointer; }
.fp-flip-btn--back { margin: .9rem -1.2rem -1.1rem; background: rgba(255,255,255,.1); color: #fff; }
@media (prefers-reduced-motion: reduce) { .fp-flip-inner { transition: none; } }
@media (max-width: 620px) {
  .fp-photo-q { grid-template-columns: 1fr; }
  /* On a phone the back is taller than the photo: swap the faces instead of turning them */
  .fp-flip-inner, .fp-flip.is-flipped .fp-flip-inner { transform: none; transition: none; }
  .fp-flip-back { transform: none; display: none; }
  .fp-flip.is-flipped .fp-flip-back { display: flex; }
  .fp-flip.is-flipped .fp-flip-front { display: none; }
  .fp-talk { padding: 1rem; }
  .fp-timeline li { flex-direction: column; gap: .35rem; }
  .fp-time { flex: none; }
  .lesson-top { gap: .5rem; }
  .lesson-top a.back { min-width: 0; flex: 1 1 auto; white-space: normal; padding: .3rem; font-size: .82rem; }
  .lesson-top .top-progress { margin-left: 0; flex-shrink: 0; }
  .fp-cards, .fp-role-grid { grid-template-columns: 1fr; }
  .fp-lesson-head { padding: 1.2rem; }
  .fp-outcomes { padding: 1rem; }
  .fp-lesson-head h2 { font-size: 1.4rem; }
  .fp-stage > summary { padding: .9rem .8rem; gap: .5rem; flex-wrap: wrap; }
  .fp-stage-time { margin-left: 2.5rem; flex-basis: calc(100% - 5rem); }
  .fp-stage > summary::after { position: absolute; right: 1rem; }
  .fp-stage > summary { position: relative; padding-right: 2.5rem; }
  .fp-stage-content { padding: .85rem; }
  .fp-stage-content > .theory, .fp-stage-content > .exercise { padding: .9rem; }
  .fp-stage-content .fr-text { padding: .9rem; }
  .fp-task { padding: .9rem; }
  .fp-stage-content .fr-scene-row { gap: .8rem; }
  .fp-stage-content .fr-text .who { min-width: 0; margin-right: .35rem; }
  .fp-stage-content .fr-banner img { max-width: 100%; }
}
@media print {
  .fp-tools, .fp-stage-links, .fp-complete, .fp-next { display: none; }
  .fp-stage, .fp-lesson-head { border: 1px solid #aaa; box-shadow: none; }
  .fp-lesson-head, .fp-lesson-head h2, .fp-lesson-head small, .fp-lesson-head p { background: white; color: #4a2636; }
}
.fp-lead { font: 600 1.1rem/1.5 "Literata", Georgia, serif; color: #4a2636; margin: 0 0 1rem; }
.fp-rubric { margin: 0 0 .9rem; font-weight: 600; color: #4a2636; }
