/* Formulaire de proposition d'un ouvrage — Numérique & Littérature
   Reprend la feuille de style du formulaire d'Éval'aide, par-dessus le DSFR. */
:root {
  --bleu: #003189; --bleu-clair: #e8edf7; --bleu-hover: #00205c;
  --gris-fond: #f0f0f0; --gris-bord: #cfcfcf; --gris-texte: #1e1e1e; --gris-doux: #4d4d4d; --blanc: #ffffff;
  --focus: #0a76f6;
  --ok-tx: #13501f; --dg-bg: #fde6e6; --dg-tx: #8a1c1c;
  --font: Marianne, Arial, sans-serif; --radius: 6px; --shadow: 0 2px 8px rgba(0,0,50,0.10);
}
body.proposer { font-family: var(--font); background: var(--gris-fond); color: var(--gris-texte); line-height: 1.55; }
.proposer a { color: var(--bleu); }
.proposer :focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 2px; }
.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; }
.proposer h1 { font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 800; margin: 12px 0 16px; line-height: 1.2; }
main.formulaire { max-width: 860px; margin: 0 auto; padding: 32px 24px 60px; }
.intro {
  background: var(--bleu-clair); border-left: 4px solid var(--bleu);
  padding: 14px 18px; margin-bottom: 28px; color: var(--bleu);
}
.form-section {
  background: var(--blanc); border: 1px solid var(--gris-bord); border-radius: var(--radius);
  padding: 24px; margin-bottom: 20px; box-shadow: var(--shadow); min-width: 0;
}
.form-section > h2, .form-section > legend {
  font-size: 1rem; font-weight: 700; color: var(--bleu); text-transform: uppercase;
  letter-spacing: .06em; margin-bottom: 18px; padding-bottom: 10px;
  border-bottom: 1px solid var(--gris-bord); width: 100%; display: block;
}
.field { margin-bottom: 16px; border: 0; min-width: 0; }
.field:last-child { margin-bottom: 0; }
.field > label, .field > legend { display: block; font-size: 0.95rem; font-weight: 600; margin-bottom: 5px; padding: 0; }
.req { color: #b0000c; margin-left: 2px; }
.hint { font-weight: 400; color: var(--gris-doux); font-size: 0.85rem; margin-left: 6px; }
input[type="text"], input[type="url"], select, textarea {
  width: 100%; padding: 9px 12px; border: 2px solid #6a6a6a; border-radius: var(--radius);
  font-family: var(--font); font-size: 1rem; color: var(--gris-texte); background: var(--blanc);
}
input:focus-visible, select:focus-visible, textarea:focus-visible { border-color: var(--bleu); outline-offset: 0; }
textarea { resize: vertical; min-height: 70px; }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.checks { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.checks label { display: inline-flex; align-items: center; gap: 6px; font-weight: 400; margin: 0; font-size: 0.95rem; }
.checks input { width: 18px; height: 18px; accent-color: var(--bleu); }

.ouvrage-bloc {
  border: 1px solid var(--gris-bord); border-radius: var(--radius); padding: 16px;
  margin-bottom: 12px; background: #fafafa; position: relative;
}
.ouvrage-bloc h3 { font-size: 0.9rem; font-weight: 700; color: var(--gris-doux); margin-bottom: 12px; text-transform: uppercase; letter-spacing: .04em; }
.btn-remove {
  position: absolute; top: 10px; right: 12px; background: var(--blanc); border: 1.5px solid #6a6a6a;
  border-radius: 4px; padding: 3px 10px; font-size: 0.85rem; cursor: pointer; color: var(--gris-texte); font-family: var(--font);
}
.btn-remove:hover { background: var(--dg-bg); border-color: #b32424; color: var(--dg-tx); }
.btn-add {
  display: inline-flex; align-items: center; gap: 6px; padding: 9px 16px;
  border: 2px dashed var(--bleu); background: none; border-radius: var(--radius);
  font-family: var(--font); font-size: 0.95rem; color: var(--bleu); cursor: pointer; margin-top: 4px; font-weight: 500;
}
.btn-add:hover { background: var(--bleu-clair); }
.actions { display: flex; gap: 12px; margin-top: 24px; flex-wrap: wrap; }
.btn-generate {
  padding: 11px 24px; background: var(--bleu); color: var(--blanc); border: 2px solid var(--bleu);
  border-radius: var(--radius); font-family: var(--font); font-size: 1rem; font-weight: 600; cursor: pointer;
}
.btn-generate:hover { background: var(--bleu-hover); }
.btn-reset {
  padding: 11px 18px; background: var(--blanc); color: var(--gris-texte); border: 2px solid #6a6a6a;
  border-radius: var(--radius); font-family: var(--font); font-size: 1rem; cursor: pointer;
}
.btn-reset:hover { background: #eee; }
#result-zone { margin-top: 28px; }
#result-zone[hidden] { display: none; }
.result-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; flex-wrap: wrap; gap: 10px; }
.result-header h2 { font-size: 1.05rem; font-weight: 700; color: var(--ok-tx); display: flex; align-items: center; gap: 8px; }
.btn-copy {
  padding: 8px 16px; background: var(--ok-tx); color: var(--blanc); border: 2px solid var(--ok-tx);
  border-radius: var(--radius); font-family: var(--font); font-size: 0.95rem; font-weight: 600; cursor: pointer;
}
.btn-copy:hover { background: #0b3414; }
#json-output {
  width: 100%; font-family: 'Courier New', Courier, monospace; font-size: 0.88rem; padding: 16px;
  border: 2px solid #2e7d32; border-radius: var(--radius); background: #f6fff6; color: #10301a;
  resize: vertical; min-height: 280px;
}
.mail-instructions { margin-top: 16px; background: #fff8e1; border-left: 4px solid #b27a00; padding: 14px 18px; font-size: 0.95rem; }
.btn-mail {
  display: inline-flex; align-items: center; gap: 7px; margin-top: 12px; padding: 9px 18px;
  background: var(--bleu); color: var(--blanc); border-radius: var(--radius);
  font-size: 0.95rem; font-weight: 600; text-decoration: none;
}
.btn-mail:hover { background: var(--bleu-hover); }
.error-msg {
  background: var(--dg-bg); border: 2px solid #b32424; border-radius: var(--radius);
  padding: 12px 16px; color: var(--dg-tx); margin-top: 16px;
}
.error-msg[hidden] { display: none; }
.error-msg ul { padding-left: 20px; }

@media (max-width: 700px) { .row-2 { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
.proposer a.btn-mail { color: var(--blanc); }
