
/* Sur l’écran de résultat, le bandeau reste réellement disponible pendant le
   défilement. C’est particulièrement important sur tablette : l’auto-scroll
   vers le bilan ne doit jamais faire disparaître le bouton Retour. */
body.nl-harmony-module.nl-module-lecture-notes.ldn-result-view-active .notalix-global-topbar {
  position:sticky;
  top:4px;
  z-index:120;
}
body.nl-harmony-module.nl-module-lecture-notes.ldn-result-view-active .result-panel:not([hidden]) {
  scroll-margin-top:82px !important;
}
/* Une fois l’exercice terminé, les réglages de jeu ne sont plus utiles.
   Ils réapparaissent automatiquement si l’élève refait l’exercice. */
body.nl-harmony-module.nl-module-lecture-notes.ldn-result-view-active :is(#exercise-settings-panel,.exercise-settings,.exercise-settings-toggle,.exercise-settings-help,.shortcut-help) {
  display:none !important;
}

body.nl-harmony-module.nl-module-lecture-notes.ldn-result-view-active > .instrument-card {
  width:min(1100px,100%) !important;
  max-width:100% !important;
  padding:clamp(6px,2.5vh,24px) clamp(5px,2vw,20px) 0 !important;
  border:0 !important;
  background:transparent !important;
  box-shadow:none !important;
}
.ldn-result-view-active .instrument-exercise-head { text-align:center; }
body.ldn-result-view-active .instrument-exercise-head #instrument-title {
  font-size:clamp(1.15rem,2.2vw,1.7rem);
}

.result-panel {
  --ldn-result-blue:#175995;
  --ldn-result-navy:#163653;
  --ldn-result-muted:#4e6477;
  width:100%;
  margin:clamp(10px,2.5vh,24px) auto 0;
  text-align:left;
}
.result-panel[hidden] { display:none!important; }
.ldn-result-layout {
  width:100%;
  margin:0 auto;
  display:grid;
  gap:14px;
}
.ldn-section-eyebrow {
  display:block;
  font-size:.7rem;
  line-height:1.2;
  font-weight:900;
  letter-spacing:.08em;
  text-transform:uppercase;
}
.ldn-award-card {
  --award:#795411;
  --metal:#daa83e;
  --award-soft:#fff8e7;
  display:grid;
  grid-template-columns:minmax(0,2fr) minmax(0,3fr);
  min-height:clamp(234px,36vh,345px);
  border:1px solid color-mix(in srgb,var(--metal) 42%,#e8eef3);
  border-radius:19px;
  background:linear-gradient(125deg,var(--award-soft),#fffdf9);
  box-shadow:0 12px 32px rgba(18,42,65,.08);
  overflow:hidden;
}
.ldn-award-card[data-award="2"] { --award:#43596c; --metal:#aab9c7; --award-soft:#f1f5f8; }
.ldn-award-card[data-award="1"] { --award:#87451f; --metal:#c98154; --award-soft:#fff1e8; }
.ldn-award-card[data-award="0"] { --award:#485f70; --metal:#8ea7b6; --award-soft:#f1f6f8; }
.ldn-award-stage {
  --badge-size:clamp(106px,16vh,152px);
  position:relative;
  display:grid;
  place-items:center;
  isolation:isolate;
  overflow:hidden;
  background:
    repeating-linear-gradient(to bottom,#fff2 0 1px,transparent 1px 14px) center/100% 57px no-repeat,
    radial-gradient(ellipse at center,color-mix(in srgb,var(--metal) 32%,#213c55),transparent 76%),
    linear-gradient(148deg,#223c54,#0f263c);
}
.ldn-award-badge {
  position:relative;
  width:var(--badge-size);
  aspect-ratio:1;
  border-radius:50%;
  border:1px solid color-mix(in srgb,var(--metal) 35%,white);
  display:grid;
  place-items:center;
  background:linear-gradient(145deg,color-mix(in srgb,var(--metal) 52%,white),var(--metal) 54%,var(--award));
  box-shadow:inset 0 0 0 6px #fff3,0 10px 28px #07182c80;
  color:#fffdf8;
  font:600 calc(var(--badge-size) * .54)/1 "Segoe UI Symbol",sans-serif;
}
.ldn-award-badge::before {
  content:"";
  position:absolute;
  inset:11%;
  border:1px solid #fff8;
  border-radius:inherit;
}
.ldn-award-copy {
  display:grid;
  align-content:center;
  justify-items:start;
  gap:9px;
  min-width:0;
  padding:clamp(17px,4vw,54px);
}
.ldn-award-copy .ldn-section-eyebrow { color:var(--award); }
.ldn-award-copy .ldn-award-title {
  margin:0;
  color:var(--award);
  font-size:clamp(1.55rem,3.3vw,2.85rem);
  font-weight:900;
  line-height:1.05;
  letter-spacing:-.025em;
}
.ldn-award-message {
  margin:0;
  max-width:45ch;
  color:var(--ldn-result-muted);
  font-size:clamp(.91rem,1.25vw,1.04rem);
  line-height:1.45;
}
.ldn-score-reveal {
  margin:0;
  border:1px solid color-mix(in srgb,var(--metal) 55%,white) !important;
  border-radius:8px !important;
  background:#fffdf9;
  box-shadow:none;
  color:var(--award);
  min-height:44px;
  padding:6px 13px;
  font:inherit;
  font-weight:750;
  cursor:pointer;
}
.ldn-score-details { display:flex; flex-wrap:wrap; gap:6px; align-items:center; }
.ldn-score-details[hidden] { display:none!important; }
.ldn-score-details strong,.ldn-score-details span,.ldn-score-details small { padding:5px 8px; border-radius:9px; background:#fff; }
.ldn-score-details strong { color:var(--award); font-size:1.04rem; }
.ldn-score-details span { font-weight:900; color:var(--ldn-result-navy); }
.ldn-score-details small { color:var(--ldn-result-muted); }
.ldn-result-send {
  padding:12px 14px;
  border:1px solid #cfe3d8;
  border-radius:15px;
  background:linear-gradient(135deg,#f8fcfa,#f2faf6);
}
.ldn-result-send .ldn-section-eyebrow { color:#278760; }
.ldn-result-send-head { display:flex; align-items:center; justify-content:space-between; gap:16px; }
.ldn-result-send-head h3 { margin:2px 0 4px; color:var(--ldn-result-navy); font-size:1.02rem; }
.ldn-result-send-head p { margin:0; max-width:620px; color:var(--ldn-result-muted); font-size:.8rem; line-height:1.4; }
.ldn-result-send-open,.ldn-result-send-submit {
  border:1px solid #2da76b;
  border-radius:11px;
  background:#ecfaf2;
  color:#08723e;
  font:inherit;
  font-weight:900;
  min-height:40px;
  padding:0 15px;
  white-space:nowrap;
  cursor:pointer;
}
.ldn-result-send-form { margin-top:10px; padding-top:10px; border-top:1px solid #d9e9e0; }
.ldn-result-send-form[hidden] { display:none!important; }
.ldn-result-send-preview {
  display:grid;
  gap:3px;
  margin-bottom:9px;
  padding:9px 11px;
  border-radius:11px;
  background:#fff;
  border:1px solid #dce8ee;
  color:#34516b;
  font-size:.78rem;
  line-height:1.35;
}
.ldn-result-send-preview strong { color:var(--ldn-result-navy); }
.ldn-result-send-preview small { color:var(--ldn-result-muted); }
.ldn-result-send-fields { display:grid; grid-template-columns:1.25fr .65fr 1fr 1fr; gap:9px; }
.ldn-result-send-fields label { display:grid; gap:4px; color:#294864; font-size:.72rem; font-weight:850; }
.ldn-result-send-fields label small { font-weight:650; color:var(--ldn-result-muted); }
.ldn-result-send-fields input {
  width:100%;
  min-width:0;
  height:38px;
  border:1px solid #cbdde8;
  border-radius:10px;
  background:#fff;
  padding:0 10px;
  color:var(--ldn-result-navy);
  font:inherit;
  font-size:16px;
}
.ldn-result-recipient-help { margin:7px 0 0; color:#526b80; font-size:.74rem; font-weight:700; }
.ldn-result-send-consent { display:flex; align-items:center; gap:7px; margin-top:8px; color:#36516c; font-size:.76rem; }
.ldn-result-send-actions { display:flex; justify-content:flex-end; gap:8px; margin-top:8px; }
.ldn-result-send-cancel {
  border:1px solid #cadce7;
  border-radius:11px;
  background:#fff;
  color:#36516c;
  font:inherit;
  font-size:.8rem;
  font-weight:850;
  min-height:38px;
  padding:0 14px;
  cursor:pointer;
}
.ldn-result-send-submit { background:#1f9e62; color:#fff; border-color:#1f9e62; min-width:112px; }
.ldn-result-send-status { min-height:16px; margin:6px 0 0; text-align:right; color:var(--ldn-result-muted); font-size:.75rem; font-weight:750; }
.ldn-result-send-status[data-kind="success"] { color:#08723e; }
.ldn-result-send-status[data-kind="error"] { color:#b6493e; }
.ldn-result-actions { display:grid; grid-template-columns:repeat(2,minmax(0,210px)); justify-content:center; gap:10px; }
.ldn-result-actions button,.ldn-result-actions a {
  box-sizing:border-box;
  min-height:46px;
  margin:0;
  display:grid;
  place-items:center;
  border-radius:10px !important;
  padding:10px 16px;
  font:inherit;
  font-weight:850;
  text-decoration:none;
  cursor:pointer;
}
.ldn-result-actions button { border:0; background:var(--ldn-result-blue); color:#fff; }
.ldn-result-actions a { border:1px solid #c9dfef; background:#edf5fb; color:var(--ldn-result-blue); }
.ldn-award-celebration {
  position:absolute;
  inset:0;
  display:grid;
  place-items:center;
  pointer-events:none;
}
.ldn-award-card[data-award="0"] .ldn-award-celebration { display:none; }
.ldn-award-celebration .ring {
  position:absolute;
  width:var(--badge-size);
  aspect-ratio:1;
  border:2px solid color-mix(in srgb,var(--metal) 45%,white);
  border-radius:50%;
  opacity:0;
}
.ldn-award-celebration i {
  position:absolute;
  color:color-mix(in srgb,var(--metal) 48%,white);
  font:700 1.5rem/1 "Segoe UI Symbol",sans-serif;
  opacity:0;
}
.ldn-award-celebration .n1 { --x:-105px; --y:-57px; }
.ldn-award-celebration .n2 { --x:110px; --y:-44px; }
.ldn-award-celebration .n3 { --x:-112px; --y:42px; }
.ldn-award-celebration .n4 { --x:98px; --y:52px; }
@media(prefers-reduced-motion:no-preference) {
  .ldn-award-badge { animation:ldnAwardArrival .8s cubic-bezier(.2,.75,.26,1) both; }
  .ldn-award-celebration .ring { animation:ldnAwardRing .95s ease-out .28s both; }
  .ldn-award-celebration i { animation:ldnAwardNote 1.15s ease-out .22s both; }
}
@keyframes ldnAwardArrival {
  0% { opacity:0; transform:translateY(12px) scale(.6) rotate(-12deg); }
  66% { opacity:1; transform:translateY(-3px) scale(1.07) rotate(2deg); }
  100% { transform:none; }
}
@keyframes ldnAwardRing {
  25% { opacity:.8; }
  100% { opacity:0; transform:scale(1.75); }
}
@keyframes ldnAwardNote {
  0% { opacity:0; transform:translate(calc(var(--x) * .35),calc(var(--y) * .35)) scale(.6); }
  45% { opacity:1; }
  100% { opacity:0; transform:translate(var(--x),var(--y)) scale(1.12); }
}
@media(max-width:700px) {
  .ldn-result-layout { gap:10px; }
  .ldn-award-card { grid-template-columns:minmax(0,1fr); min-height:0; }
  .ldn-award-stage { --badge-size:88px; min-height:138px; }
  .ldn-award-copy { gap:7px; }
  .ldn-result-send-head { align-items:flex-start; flex-direction:column; }
  .ldn-result-send-open { width:100%; }
  .ldn-result-send-fields { grid-template-columns:1fr; }
  .ldn-result-send-actions > * { flex:1; }
  .ldn-result-send-status { text-align:left; }
  .ldn-result-actions { grid-template-columns:minmax(0,1fr); }
  .ldn-result-actions button,.ldn-result-actions a { width:100%; min-width:0; }
}
