/* ============================================================
   don.css — Page « Donne tes cours » (don.php)
   ------------------------------------------------------------
   Chargée après corp.css (palette, fond commun). Scopée à
   body.don. Le header est fixe (79 px) : padding-top 108 px,
   comme gestion.css.
   ============================================================ */

body.don {
  --poppy: #e8392f;
  --leaf:  #5ec46e;
  --amber: #ffce4d;
  --dn-line:   rgba(255, 255, 255, .10);
  --dn-line-2: rgba(255, 255, 255, .19);
  --dn-surface:   rgba(255, 255, 255, .035);
  --dn-surface-2: rgba(255, 255, 255, .065);
  margin: 0;
  overflow-x: hidden;
}
body.don [hidden] { display: none !important; }

.dn-main { position: relative; z-index: 1; padding: 108px 0 70px; }
.dn-wrap { max-width: 760px; }

.dn-hero { margin-bottom: 22px; }
.dn-kicker {
  display: inline-block; font-size: .68rem; letter-spacing: .2em; text-transform: uppercase;
  color: var(--poppy); border: 1px solid currentColor; padding: 4px 11px; border-radius: 3px;
}
.dn-hero h1 { margin: 14px 0 10px; font-size: clamp(1.7rem, 5vw, 2.6rem); }
.dn-hero p  { margin: 0; color: var(--muted); font-size: .92rem; line-height: 1.75; }

/* ---- Top donateur ---- */
.dn-top {
  display: flex; align-items: center; gap: 14px;
  margin: 0 0 22px; padding: 12px 16px; border-radius: 4px;
  border: 1px solid color-mix(in srgb, var(--amber) 40%, transparent);
  background: color-mix(in srgb, var(--amber) 6%, transparent);
}
.dn-top-av { border-radius: 3px; image-rendering: pixelated; object-fit: cover; background: #000; }
.dn-top div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.dn-top-k { font-size: .66rem; letter-spacing: .18em; text-transform: uppercase; color: var(--amber); }
.dn-top strong { font-size: 1.02rem; overflow-wrap: anywhere; }
.dn-top-n { font-size: .78rem; color: var(--muted); }

/* ---- Cartes ---- */
.dn-card {
  border: 1px solid var(--dn-line); border-radius: 4px;
  background: var(--dn-surface); padding: 22px;
}
.dn-card h2 { margin: 0 0 8px; font-size: 1.1rem; }
.dn-guest p { color: var(--muted); font-size: .9rem; line-height: 1.7; margin: 0 0 18px; }

/* ---- Zone de dépôt ---- */
.dn-drop {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 34px 16px; text-align: center; cursor: pointer;
  border: 1px dashed var(--dn-line-2); border-radius: 4px;
  transition: border-color .18s, background .18s;
}
.dn-drop:hover, .dn-drop.is-over { border-color: var(--poppy); background: color-mix(in srgb, var(--poppy) 6%, transparent); }
.dn-drop input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.dn-drop:focus-within { outline: 2px solid var(--poppy); outline-offset: 2px; }
.dn-drop-ico img { image-rendering: pixelated; }
.dn-drop strong { font-size: 1rem; }
.dn-drop span   { color: var(--muted); font-size: .84rem; }
.dn-drop small  { color: var(--faint); font-size: .72rem; margin-top: 6px; line-height: 1.5; }

/* ---- File d'envoi ---- */
.dn-queue { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 8px; }
.dn-queue li {
  display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; align-items: center;
  padding: 10px 12px; border: 1px solid var(--dn-line); border-radius: 3px; background: var(--dn-surface-2);
  font-size: .82rem;
}
.dn-q-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dn-q-size { color: var(--muted); font-size: .74rem; }
.dn-q-bar  { grid-column: 1 / -1; height: 4px; border-radius: 2px; background: var(--dn-line); overflow: hidden; }
.dn-q-bar i { display: block; height: 100%; width: 0; background: var(--poppy); transition: width .2s; }
.dn-q-msg  { grid-column: 1 / -1; font-size: .74rem; color: var(--muted); }
.dn-queue li.is-ok  .dn-q-bar i { background: var(--leaf); }
.dn-queue li.is-ok  .dn-q-msg   { color: var(--leaf); }
.dn-queue li.is-err { border-color: color-mix(in srgb, var(--poppy) 50%, transparent); }
.dn-queue li.is-err .dn-q-msg   { color: #f08a82; }
.dn-q-del {
  border: 0; background: none; color: var(--muted); cursor: pointer; font: inherit; padding: 0 2px;
}
.dn-q-del:hover { color: var(--poppy); }

.dn-toobig {
  margin-top: 14px; padding: 12px 14px; border-radius: 3px; font-size: .82rem; line-height: 1.65;
  border: 1px solid color-mix(in srgb, var(--amber) 45%, transparent);
  background: color-mix(in srgb, var(--amber) 8%, transparent);
}
.dn-toobig strong { color: var(--amber); display: block; margin-bottom: 2px; }
.dn-toobig a { color: var(--amber); }

.dn-note { display: flex; flex-direction: column; gap: 6px; margin-top: 16px; font-size: .82rem; color: var(--muted); }
.dn-note em { font-style: normal; color: var(--faint); }
.dn-note input {
  font: inherit; color: var(--ink); background: rgba(0, 0, 0, .35);
  border: 1px solid var(--dn-line-2); border-radius: 3px; padding: 10px 12px;
}
.dn-note input:focus { outline: none; border-color: var(--poppy); }

/* ---- Boutons ---- */
.dn-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-top: 18px; }
.dn-btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 11px 20px; border-radius: 3px; cursor: pointer;
  border: 1px solid var(--dn-line-2); background: var(--dn-surface-2);
  color: var(--ink); font: inherit; font-size: .88rem; text-decoration: none;
  transition: background .18s, border-color .18s, opacity .18s;
}
.dn-btn:hover { border-color: var(--ink); }
.dn-btn-primary { background: var(--poppy); border-color: var(--poppy); color: #fff; }
.dn-btn-primary:hover { background: #c92e25; border-color: #c92e25; }
.dn-btn:disabled { opacity: .4; cursor: not-allowed; }
.dn-status { font-size: .8rem; color: var(--muted); }

.dn-rules { color: var(--faint); font-size: .76rem; line-height: 1.6; margin: 12px 2px 26px; }

/* ---- Mes dons ---- */
.dn-mine-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.dn-mine-head span { color: var(--muted); font-size: .8rem; }
.dn-mine-head b { color: var(--amber); }
.dn-mine ul { list-style: none; margin: 0; padding: 0; }
.dn-mine li {
  display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; align-items: center;
  padding: 9px 0; border-top: 1px solid var(--dn-line); font-size: .82rem;
}
.dn-mine-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dn-mine-meta { grid-row: 2; color: var(--faint); font-size: .72rem; }
.dn-pill {
  grid-row: 1 / span 2; grid-column: 2;
  font-size: .7rem; padding: 3px 9px; border-radius: 99px; border: 1px solid; white-space: nowrap;
}
.dn-pill.is-pending { color: var(--muted); border-color: var(--dn-line-2); }
.dn-pill.is-useful  { color: var(--leaf);  border-color: color-mix(in srgb, var(--leaf) 50%, transparent); }
.dn-pill.is-troll   { color: #f08a82;      border-color: color-mix(in srgb, var(--poppy) 50%, transparent); }

/* ============================================================
   MERCI PAILLETÉ
   ============================================================ */
.dn-thanks {
  position: fixed; inset: 0; z-index: 1000;
  display: grid; place-items: center; padding: 16px;
  background: rgba(6, 5, 9, .72);
  animation: dn-fade .3s ease-out;
}
#dn-sparkles { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.dn-thanks-card {
  position: relative; max-width: 400px; width: 100%; text-align: center;
  padding: 30px 24px 24px; border-radius: 6px;
  border: 1px solid color-mix(in srgb, var(--amber) 55%, transparent);
  background: #141219;
  box-shadow: 0 0 0 1px rgba(0,0,0,.6), 0 24px 60px rgba(0,0,0,.55);
  animation: dn-pop .55s cubic-bezier(.2, 1.4, .4, 1);
}
.dn-thanks-ico { image-rendering: pixelated; animation: dn-spin 1.1s cubic-bezier(.2, 1.2, .4, 1); }
.dn-thanks-card h2 {
  margin: 12px 0 8px; font-size: 1.35rem;
  background: linear-gradient(90deg, var(--amber), #fff3c4, var(--poppy), var(--amber));
  background-size: 300% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: dn-shine 2.4s linear infinite;
}
.dn-thanks-card p { margin: 0 0 20px; color: var(--muted); font-size: .86rem; line-height: 1.6; }

@keyframes dn-fade  { from { opacity: 0; } }
@keyframes dn-pop   { from { opacity: 0; transform: scale(.7) translateY(20px); } }
@keyframes dn-spin  { from { transform: rotate(-200deg) scale(.2); } }
@keyframes dn-shine { to { background-position: 300% 0; } }

@media (prefers-reduced-motion: reduce) {
  .dn-thanks, .dn-thanks-card, .dn-thanks-ico, .dn-thanks-card h2 { animation: none; }
}

@media (max-width: 560px) {
  .dn-main { padding-top: 112px; }
  .dn-card { padding: 16px; }
  .dn-actions .dn-btn { flex: 1 1 100%; }
}
