/* Kraaft - Sensibilisation RGPD. Palette reprise de kraaft.com. */
:root {
  --blue: #2d62ff;
  --blue-dark: #1f47c4;
  --blue-lighter: #ecf0fe;
  --blue-light: #d9e5ff;
  --bg-blue: #e3f3fd;
  --yellow: #ffd738;
  --purple: #9129ff;
  --green: #114e0b;
  --green-bg: #cef5ca;
  --red: #3b0b0b;
  --red-bg: #f8e4e4;
  --grey: #575757;
  --ink: #111;
  --border: #e6e6ee;
  --white: #fff;
  --radius: 12px;
  --radius-lg: 20px;
  --shadow: 0 1px 2px rgba(17, 17, 17, .05), 0 8px 30px rgba(45, 98, 255, .06);
  --maxw: 760px;
  --font: "Azeret", Azeret, Arial, "Helvetica Neue", Helvetica, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: linear-gradient(180deg, var(--blue-lighter), #fff 340px);
  line-height: 1.6;
  min-height: 100vh;
}
a { color: var(--blue); }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

/* Header */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 20px 0; flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 12px; font-weight: 700; letter-spacing: -.01em; }
.brand .logo { width: 34px; height: 34px; display: block; flex: none; }
.brand .sub { font-weight: 500; color: var(--grey); font-size: 13px; }
/* Sélecteur de langue */
.lang-switch { display: inline-flex; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; background: #fff; }
.lang-switch button {
  appearance: none; border: 0; cursor: pointer; font-family: inherit; font-weight: 700; font-size: 13px;
  padding: 8px 14px; background: transparent; color: var(--grey); transition: background .12s, color .12s;
}
.lang-switch button + button { border-left: 1px solid var(--border); }
.lang-switch button:hover { background: var(--blue-lighter); color: var(--blue-dark); }
.lang-switch button.active { background: var(--blue); color: #fff; }

/* Progress */
.progress { display: flex; gap: 8px; margin: 8px 0 28px; }
.progress .step {
  flex: 1; height: 6px; border-radius: 99px; background: var(--blue-light);
  transition: background .3s;
}
.progress .step.done { background: var(--blue); }
.progress .step.current { background: var(--yellow); }

/* Cards */
.card {
  background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-lg);
  box-shadow: var(--shadow); padding: 28px; margin-bottom: 20px;
}
.card h1 { font-size: 28px; line-height: 1.2; margin: 0 0 8px; letter-spacing: -.02em; }
.card h2 { font-size: 21px; margin: 0 0 6px; letter-spacing: -.01em; }
.eyebrow {
  display: inline-block; font-size: 12px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .08em; color: var(--blue); background: var(--blue-lighter);
  padding: 4px 10px; border-radius: 99px; margin-bottom: 14px;
}
.lead { font-size: 16px; color: var(--grey); }

/* Sections de contenu */
.section { border-top: 1px solid var(--border); padding-top: 22px; margin-top: 22px; }
.section:first-of-type { border-top: 0; margin-top: 0; padding-top: 0; }
.section .num {
  display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 9px;
  background: var(--blue); color: #fff; font-weight: 800; font-size: 15px; margin-right: 10px;
}
.section h2 { display: flex; align-items: center; gap: 4px; }
.section p { margin: 10px 0; }
.section ul { margin: 10px 0; padding-left: 22px; }
.section li { margin: 6px 0; }

.callout {
  border-radius: var(--radius); padding: 14px 16px; margin: 14px 0;
  border: 1px solid var(--border); background: var(--bg-blue); font-size: 15px;
}
.callout.warn { background: #fff7d6; border-color: #f2e6a0; }
.callout.good { background: var(--green-bg); border-color: #b6e6ae; }
.callout strong { color: var(--ink); }
.chip {
  display: inline-block; background: var(--blue-lighter); color: var(--blue-dark);
  border-radius: 99px; padding: 2px 10px; font-size: 13px; font-weight: 600; margin: 2px 4px 2px 0;
}
.chip.y { background: #fff3c4; color: #6b5b00; }
.chip.p { background: #f0e2ff; color: #6a17c4; }

/* Boutons */
.btn {
  appearance: none; border: 0; cursor: pointer; font-family: inherit; font-weight: 700;
  font-size: 15px; padding: 13px 22px; border-radius: var(--radius); background: var(--blue);
  color: #fff; transition: background .15s, transform .05s; text-decoration: none;
  display: inline-flex; align-items: center; gap: 8px;
}
.btn:hover { background: var(--blue-dark); }
.btn:active { transform: translateY(1px); }
.btn.secondary { background: var(--white); color: var(--ink); border: 1px solid var(--border); }
.btn.secondary:hover { background: #f6f7fb; }
.btn.ghost { background: transparent; color: var(--grey); padding-left: 6px; padding-right: 6px; }
.btn.danger { background: #c62828; color: #fff; }
.btn.danger:hover { background: #a81f1f; }
.btn.danger-ghost { background: transparent; color: #c62828; border: 1px solid #f1c4c4; }
.btn.danger-ghost:hover { background: #fdecec; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 24px; }

/* Quiz */
.q { margin: 0 0 18px; padding: 18px; border: 1px solid var(--border); border-radius: var(--radius); }
.q .qtext { font-weight: 700; margin-bottom: 12px; }
.q .opt {
  display: flex; align-items: flex-start; gap: 10px; padding: 11px 13px; border: 1px solid var(--border);
  border-radius: 10px; margin: 8px 0; cursor: pointer; transition: border-color .12s, background .12s;
}
.q .opt:hover { border-color: var(--blue-light); background: #fafbff; }
.q .opt input { margin-top: 3px; accent-color: var(--blue); }
.q .opt.correct { border-color: #8fd587; background: var(--green-bg); }
.q .opt.wrong { border-color: #e2a3a3; background: var(--red-bg); }
.q .explain { font-size: 14px; color: var(--grey); margin-top: 8px; padding-left: 2px; display: none; }
.q.answered .explain { display: block; }

/* Formulaire d'émargement */
.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 6px; }
.field input[type=text], .field input[type=email] {
  width: 100%; font-family: inherit; font-size: 15px; padding: 12px 14px;
  border: 1px solid var(--border); border-radius: 10px; background: #fff;
}
.field input:focus { outline: 2px solid var(--blue-light); border-color: var(--blue); }
.field input.locked { background: #f3f5f9; color: var(--grey); cursor: not-allowed; }
.field input.locked:focus { outline: none; border-color: var(--border); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.consent { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; color: var(--grey); }
.consent input { margin-top: 3px; accent-color: var(--blue); width: 18px; height: 18px; }
.err { color: #b3261e; font-size: 14px; margin-top: 10px; min-height: 18px; }

/* Attestation / confirmation */
.attest {
  border: 2px dashed var(--blue-light); border-radius: var(--radius-lg); padding: 26px; text-align: center;
  background: linear-gradient(180deg, #fff, var(--blue-lighter));
}
.attest .check {
  width: 56px; height: 56px; border-radius: 50%; background: var(--green-bg); color: var(--green);
  display: grid; place-items: center; margin: 0 auto 14px; font-size: 28px;
}
.attest .meta { font-size: 14px; color: var(--grey); margin-top: 10px; }
.attest .badge {
  display: inline-block; margin-top: 10px; padding: 6px 14px; border-radius: 99px;
  font-weight: 700; font-size: 14px;
}
.badge.pass { background: var(--green-bg); color: var(--green); }
.badge.fail { background: #fff3c4; color: #6b5b00; }

.score-big { font-size: 40px; font-weight: 800; color: var(--blue); letter-spacing: -.02em; }

.footer { text-align: center; color: var(--grey); font-size: 13px; padding: 24px 0 40px; }
.hidden { display: none !important; }

/* Espace DPO */
.dpo-login { max-width: 420px; margin: 40px auto; }
table.reg { width: 100%; border-collapse: collapse; font-size: 14px; }
table.reg th, table.reg td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); white-space: nowrap; }
table.reg th { color: var(--grey); font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; }
table.reg tr:hover td { background: #fafbff; }
.tag { display: inline-block; padding: 2px 9px; border-radius: 99px; font-size: 12px; font-weight: 700; }
.tag.ok { background: var(--green-bg); color: var(--green); }
.tag.ko { background: #fff3c4; color: #6b5b00; }
.stats { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.stat { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 18px; flex: 1; min-width: 130px; }
.stat .n { font-size: 26px; font-weight: 800; color: var(--blue); }
.stat .l { font-size: 13px; color: var(--grey); }
.table-scroll { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: #fff; }

@media (max-width: 560px) {
  .card { padding: 20px; }
  .card h1 { font-size: 24px; }
  .row2 { grid-template-columns: 1fr; }
  .actions { flex-direction: column-reverse; align-items: stretch; }
  .actions .btn { justify-content: center; }
}

@media print {
  body { background: #fff; }
  .topbar, .progress, .actions, .footer, .btn { display: none !important; }
  .card { box-shadow: none; border: 1px solid #ccc; }
}
