/*
 * Journal Club Gynaecologie – stylesheet (handgeschreven, geen framework, geen externe fonts; D003).
 * Kleuren afgeleid van het logo. Scorekleuren altijd samen met tekst/icoon (kleurenblindheid, SPEC §13).
 */
:root {
    --navy: #13285c;
    --navy-light: #2a4688;
    --green: #3f7a48;      /* donkerder dan het logo-groen voor voldoende contrast */
    --green-bg: #e6f1e7;
    --yellow: #8a5a00;
    --yellow-bg: #fdf1d6;
    --red: #b42318;
    --red-bg: #fde8e6;
    --grey-bg: #f1f2f4;
    --text: #1d2433;
    --muted: #5b6475;
    --border: #d5d9e0;
    --bg: #ffffff;
    --bg-soft: #f7f8fa;
    --focus: #f0ae2a;
    --radius: 6px;
    --max: 72rem;
    font-size: 100%;
}

*, *::before, *::after { box-sizing: border-box; }

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.55;
    color: var(--text);
    background: var(--bg-soft);
}

h1, h2, h3 { font-family: Georgia, "Times New Roman", serif; color: var(--navy); line-height: 1.25; }
h1 { font-size: 1.9rem; margin: 1.2rem 0 1rem; }
h2 { font-size: 1.35rem; margin: 1.4rem 0 .6rem; }
h3 { font-size: 1.1rem; }

a { color: var(--navy-light); }
a:hover { color: var(--navy); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

.container { max-width: var(--max); margin: 0 auto; padding: 0 1rem; }
main.container { padding-bottom: 3rem; min-height: 60vh; }
main:focus { outline: none; }

.skip-link { position: absolute; left: -9999px; top: 0; background: var(--navy); color: #fff; padding: .5rem 1rem; z-index: 10; }
.skip-link:focus { left: 0; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------------------------------------------------------------- header / footer */
.site-header { background: #fff; border-bottom: 3px solid; border-image: linear-gradient(90deg, #5a9161 33%, #f0ae2a 33% 66%, #ee3a24 66%) 1; }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding-top: .6rem; padding-bottom: .6rem; }
.brand img { display: block; height: auto; max-width: 70vw; }
.main-nav ul { list-style: none; display: flex; flex-wrap: wrap; align-items: center; gap: .3rem 1.1rem; margin: 0; padding: 0; }
.main-nav a { text-decoration: none; font-weight: 500; }
.main-nav a:hover { text-decoration: underline; }

.site-footer { background: var(--navy); color: #dfe5f2; margin-top: 2rem; }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; padding-top: 1.2rem; padding-bottom: 1.2rem; font-size: .92rem; }
.site-footer ul { list-style: none; display: flex; gap: 1.2rem; margin: 0; padding: 0; }
.site-footer a { color: #fff; }
.site-footer p { margin: 0; }

.sub-nav ul, .tabs ul { list-style: none; display: flex; flex-wrap: wrap; gap: .4rem; padding: 0; margin: 1rem 0; }
.sub-nav a, .tabs a { display: inline-block; padding: .35rem .8rem; border: 1px solid var(--border); border-radius: 999px; background: #fff; text-decoration: none; font-size: .95rem; }
.tabs a[aria-current="page"] { background: var(--navy); color: #fff; border-color: var(--navy); }

/* ---------------------------------------------------------------- blokken */
.card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 1.2rem 1.4rem; margin: 1rem 0; }
.card h2:first-child, .card h1:first-child { margin-top: 0; }
.narrow { max-width: 38rem; }
section.narrow.card { margin-left: auto; margin-right: auto; }
.grid-2 { display: grid; grid-template-columns: 1fr; gap: 0 1.2rem; }
@media (min-width: 900px) { .grid-2 { grid-template-columns: 3fr 2fr; } }
.title-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }

.hero { padding: 1rem 0 .5rem; }
.lead { font-size: 1.15rem; max-width: 46rem; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.prose { max-width: 46rem; }
.plain-list { list-style: none; padding: 0; }
.plain-list li { padding: .35rem 0; border-bottom: 1px solid var(--border); }
.checklist li { margin: .25rem 0; }
.hospital-list { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr)); gap: .7rem; }
.hospital-list li { background: #fff; border: 1px solid var(--border); border-left: 4px solid var(--navy); border-radius: var(--radius); padding: .7rem .9rem; }
.data-list { display: grid; grid-template-columns: minmax(9rem, max-content) 1fr; gap: .35rem 1rem; margin: 0; }
.data-list dt { font-weight: 600; color: var(--muted); }
.data-list dd { margin: 0; overflow-wrap: anywhere; }
pre.debug { white-space: pre-wrap; font-size: .8rem; background: #fff; border: 1px solid var(--border); padding: 1rem; overflow: auto; }

/* ---------------------------------------------------------------- scores (kleur + icoon + tekst) */
.score-legend { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.score { display: inline-flex; align-items: center; gap: .4rem; padding: .25rem .7rem; border-radius: 999px; font-weight: 600; font-size: .92rem; border: 1px solid transparent; }
.score::before { font-weight: 700; }
.score-green { background: var(--green-bg); color: var(--green); border-color: var(--green); }
.score-green::before { content: "✓"; }
.score-yellow { background: var(--yellow-bg); color: var(--yellow); border-color: #d99a17; }
.score-yellow::before { content: "?"; }
.score-red { background: var(--red-bg); color: var(--red); border-color: var(--red); }
.score-red::before { content: "✕"; }
.score-unscored { background: var(--grey-bg); color: var(--muted); border-color: var(--border); }
.score-unscored::before { content: "–"; }

/* ---------------------------------------------------------------- meldingen en badges */
.alert { padding: .75rem 1rem; border-radius: var(--radius); margin: 1rem 0; border-left: 5px solid; background: #fff; }
.alert-success { border-color: var(--green); background: var(--green-bg); }
.alert-error { border-color: var(--red); background: var(--red-bg); }
.alert-info { border-color: var(--navy-light); background: #e8eef9; }

.badge { display: inline-block; font-size: .78rem; font-weight: 600; padding: .1rem .5rem; border-radius: 999px; vertical-align: middle; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif; }
.badge-active { background: var(--green-bg); color: var(--green); }
.badge-pending { background: var(--yellow-bg); color: var(--yellow); }
.badge-unverified { background: var(--grey-bg); color: var(--muted); }
.badge-blocked, .badge-rejected { background: var(--red-bg); color: var(--red); }
.badge-deactivated { background: var(--grey-bg); color: var(--muted); }

.stat-row { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); gap: .8rem; }
.stat a { display: block; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: .8rem 1rem; text-decoration: none; color: var(--text); }
.stat-value { display: block; font-size: 1.8rem; font-weight: 700; color: var(--navy); }
.stat-label { color: var(--muted); font-size: .9rem; }

/* ---------------------------------------------------------------- formulieren */
.field { margin: 0 0 1rem; border: 0; padding: 0; }
.field label, .field legend { display: block; font-weight: 600; margin-bottom: .25rem; }
.field-row { display: grid; grid-template-columns: 1fr; gap: 0 1rem; }
@media (min-width: 640px) { .field-row { grid-template-columns: 1fr 1fr; } }
input[type="text"], input[type="email"], input[type="password"], input[type="search"], input[type="number"], input[type="date"], input[type="time"], input:not([type]), select, textarea {
    width: 100%; padding: .55rem .65rem; font: inherit; color: inherit;
    border: 1px solid #9aa3b2; border-radius: var(--radius); background: #fff;
}
textarea { resize: vertical; }
.has-error input, .has-error select, .has-error textarea { border-color: var(--red); }
.field-error { color: var(--red); font-size: .9rem; margin: .25rem 0 0; }
.field-error::before { content: "⚠ "; }
.hint { color: var(--muted); font-size: .88rem; margin: 0 0 .3rem; }
.req { color: var(--red); }
.radio { display: block; font-weight: 400 !important; margin: .2rem 0; }
.checkbox-field { display: block; margin: .6rem 0 1rem; }
.checkbox-field input, .radio input { margin-right: .4rem; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form-links { margin-top: 1rem; font-size: .95rem; }
.inline-form { display: inline; margin: 0; }
.action-form { margin: 0 0 1rem; padding-bottom: 1rem; border-bottom: 1px solid var(--border); }
.action-form label { display: block; font-weight: 600; margin: .3rem 0; }
.action-form input:not([type="checkbox"]), .action-form select { margin-bottom: .5rem; }
.filter-bar { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .7rem; margin: 1rem 0; }
.filter-bar input, .filter-bar select { width: auto; min-width: 10rem; }
details.danger-zone summary { cursor: pointer; color: var(--red); font-weight: 600; }
section.danger-zone { border-color: #f1b7b0; }

.button { display: inline-block; padding: .55rem 1.1rem; border-radius: var(--radius); border: 1px solid var(--navy); background: var(--navy); color: #fff !important; font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; }
.button:hover { background: var(--navy-light); }
.button-secondary { background: #fff; color: var(--navy) !important; }
.button-secondary:hover { background: #eef1f7; }
.button-danger { background: var(--red); border-color: var(--red); }
.button-danger:hover { background: #8f1c13; }
.button-small { padding: .3rem .75rem; font-size: .92rem; }
.link-button { background: none; border: 0; padding: 0; font: inherit; font-weight: 500; color: var(--navy-light); text-decoration: underline; cursor: pointer; }

/* ---------------------------------------------------------------- tabellen */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; background: #fff; font-size: .95rem; }
th, td { text-align: left; padding: .5rem .6rem; border-bottom: 1px solid var(--border); vertical-align: top; }
th { background: var(--bg-soft); font-weight: 600; color: var(--muted); }
tr.inactive td { color: var(--muted); }
.pagination { display: flex; gap: 1rem; align-items: center; margin: 1rem 0; }

@media print {
    .site-header nav, .site-footer, .sub-nav { display: none; }
}

/* ---------------------------------------------------------------- kleine schermen */
@media (max-width: 480px) {
    h1 { font-size: 1.55rem; }
    .card { padding: .9rem 1rem; }
    .brand img { width: 200px; }
    .data-list { grid-template-columns: 1fr; }
    .data-list dt { margin-top: .4rem; }
}

/* ---------------------------------------------------------------- PDF-viewer */
.viewer-title { font-size: 1.4rem; margin-bottom: .2rem; }
.pdf-viewer { margin-top: 1rem; }
.pdf-toolbar { position: sticky; top: 0; z-index: 2; display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; background: var(--bg-soft); padding: .5rem 0; border-bottom: 1px solid var(--border); }
.pdf-page-info { margin-left: auto; color: var(--muted); font-variant-numeric: tabular-nums; }
.pdf-actions { display: flex; gap: .4rem; }
.pdf-pages { display: flex; flex-direction: column; align-items: safe center; gap: 1rem; padding: 1rem 0; overflow-x: auto; user-select: none; -webkit-user-select: none; }
.pdf-page { background: #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, .15); min-width: min(100%, 1100px); display: flex; justify-content: center; }
.pdf-page canvas { display: block; max-width: none; }
.pdf-status[hidden] { display: none; }
@media print {
    .pdf-viewer, .viewer-title { display: none !important; }
    body::after { content: "Afdrukken is niet toegestaan."; display: block; padding: 2rem; }
}

/* ---------------------------------------------------------------- inhoud (Fase 2) */
.upcoming-list { list-style: none; padding: 0; margin: 0; }
.upcoming-list li { display: flex; gap: 1rem; align-items: center; padding: .6rem 0; border-bottom: 1px solid var(--border); }
.upcoming-list li:last-child { border-bottom: 0; }
.upcoming-date { flex: 0 0 4.2rem; text-align: center; background: var(--navy); color: #fff; border-radius: var(--radius); padding: .35rem .2rem; font-size: 1.5rem; font-weight: 700; line-height: 1.1; }
.upcoming-date small { display: block; font-size: .72rem; font-weight: 500; text-transform: uppercase; letter-spacing: .03em; }

.program { list-style: none; padding: 0; margin: .5rem 0 0; }
.program li { display: grid; grid-template-columns: 3.5rem 1fr; gap: .2rem .8rem; padding: .7rem 0; border-top: 1px solid var(--border); align-items: start; }
.program-time { color: var(--muted); font-variant-numeric: tabular-nums; padding-top: .1rem; }
.program-score { grid-column: 2; }
@media (min-width: 760px) {
    .program li { grid-template-columns: 3.5rem 1fr auto; }
    .program-score { grid-column: auto; }
}
.program-item .program-body { font-style: italic; }
.session-card h2 { margin-bottom: .2rem; }
.score-retro { font-weight: 400; font-size: .8rem; }

.article-title { font-size: 1.6rem; margin-bottom: .4rem; }
.article-meta { color: var(--muted); margin-top: 0; }
.chip { display: inline-block; background: #e8eef9; color: var(--navy); border-radius: 999px; padding: .1rem .6rem; font-size: .85rem; margin: 0 .2rem .25rem 0; }
.chip-light { background: var(--grey-bg); color: var(--text); }
.chip-button { border: 1px solid var(--border); cursor: pointer; font: inherit; font-size: .85rem; }
.chip-suggestions { margin-top: .4rem; min-height: 1rem; }
.presentation h3 { margin: 0; }
.take-home { background: var(--bg-soft); border-left: 4px solid var(--navy); padding: .6rem .9rem; margin: .8rem 0; }
.take-home p { margin: .2rem 0 0; }
.fiche summary { cursor: pointer; font-weight: 600; color: var(--navy); margin: .6rem 0; }
.fiche-list { margin: 0; }
.fiche-list dt { font-weight: 600; color: var(--muted); margin-top: .7rem; font-size: .9rem; }
.fiche-list dd { margin: .15rem 0 0; }
.fiche-grid { display: grid; grid-template-columns: 1fr; gap: 0 1.2rem; }
@media (min-width: 900px) { .fiche-grid { grid-template-columns: 1fr 1fr; } }
.checkbox-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr)); gap: 0 1rem; }
.upload-form { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--border); }
.upload-form label { display: block; font-weight: 600; margin-bottom: .25rem; }
.editor-box { margin-top: 1rem; }
.editor-box summary { cursor: pointer; color: var(--navy-light); }
.score-choice .radio { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin: .4rem 0; }


/* ---------------------------------------------------------------- Fase 4: lijsten, blog, alumni, zoeken */
.result-list { list-style: none; padding: 0; margin: 0; }
.result-list > li { display: flex; gap: 1rem; justify-content: space-between; align-items: flex-start; background: #fff;
    border: 1px solid var(--border); border-radius: var(--radius); padding: .8rem 1rem; margin-bottom: .6rem; }
.result-main { min-width: 0; }
.result-title { font-weight: 600; }
.result-score { flex: 0 0 auto; }
@media (max-width: 640px) { .result-list > li { flex-direction: column; gap: .4rem; } }
.take-home-snippet { color: var(--muted); border-left: 3px solid var(--border); padding-left: .6rem; margin: .4rem 0 0; }
.cta { border-left: 5px solid var(--navy); background: #f2f5fb; }
.home-stats { margin: 1rem 0 1.5rem; }

.search-form { margin-bottom: 1rem; }
.search-main { display: flex; gap: .5rem; }
.search-main input { flex: 1; }
.search-filters summary { cursor: pointer; color: var(--navy-light); margin: .6rem 0; }
.filter-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr)); gap: 0 1rem; }

.post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr)); gap: 1rem; }
.post-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.post-card img { width: 100%; height: 11rem; object-fit: cover; display: block; }
.post-card-body { padding: .8rem 1rem; }
.post-card h2 { font-size: 1.15rem; margin: 0 0 .2rem; }
.blog-post .cover img { width: 100%; height: auto; border-radius: var(--radius); }
.blog-post figure { margin: 1rem 0; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr)); gap: .8rem; max-width: 46rem; }
.gallery figure { margin: 0; }
.gallery img { width: 100%; height: 9rem; object-fit: cover; border-radius: var(--radius); display: block; }
.gallery figcaption { font-size: .85rem; color: var(--muted); }
.photo-admin { list-style: none; padding: 0; }
.photo-admin li { display: flex; gap: .8rem; padding: .6rem 0; border-top: 1px solid var(--border); }
.photo-admin img { border-radius: var(--radius); height: auto; }
.consent { background: var(--yellow-bg); padding: .5rem .7rem; border-radius: var(--radius); }

.alumni-grid { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); gap: .7rem; }
.alumni-card { display: flex; gap: .8rem; align-items: flex-start; background: #fff; border: 1px solid var(--border);
    border-radius: var(--radius); padding: .8rem; text-decoration: none; color: var(--text); height: 100%; }
.alumni-card:hover { border-color: var(--navy-light); }
.avatar { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; flex: 0 0 auto; }
.avatar-large { width: 96px; height: 96px; }
.avatar-initials { display: inline-flex; align-items: center; justify-content: center; background: #e8eef9; color: var(--navy);
    font-weight: 700; font-size: 1.2rem; }
.avatar-large.avatar-initials { font-size: 1.8rem; }
.alumni-head { display: flex; gap: 1rem; align-items: center; }
.alumni-head h1 { margin: 0; }

/* ---------------------------------------------------------------- W3–W5: deelname, vragen, presenteren */
.rsvp-choice { border: 0; padding: 0; margin: 0 0 .5rem; display: flex; flex-wrap: wrap; gap: .4rem; }
.rsvp-choice legend { font-weight: 600; margin-bottom: .3rem; }
.rsvp-option { border: 1px solid var(--border); border-radius: 999px; padding: .25rem .8rem; cursor: pointer; background: #fff; }
.rsvp-option:has(input:checked) { border-color: var(--navy); background: #e8eef9; }
.rsvp-counts { margin: .8rem 0 .3rem; }
.attendee-list { margin: .2rem 0 .6rem; padding-left: 1.1rem; font-size: .92rem; }
.presenter-tools { display: flex; gap: .5rem; align-items: center; margin-top: .4rem; }
.questions { margin-top: .5rem; }
.questions summary { cursor: pointer; color: var(--navy-light); font-size: .92rem; }
.question-list { list-style: none; padding: 0; margin: .4rem 0; }
.question-list li { border-left: 3px solid var(--border); padding: .2rem .7rem; margin-bottom: .5rem; }
.question-list li.answered { border-left-color: var(--green); opacity: .8; }
.question-list p { margin: .1rem 0; }
.question-form textarea { margin-bottom: .3rem; }
.mail-preview { white-space: pre-wrap; font-size: .85rem; background: var(--bg-soft); padding: .8rem; border-radius: var(--radius); }

/* ---------------------------------------------------------------- tweestapsverificatie, privacy */
.qr { background: #fff; padding: .5rem; border: 1px solid var(--border); border-radius: var(--radius); margin: .5rem 0; }
.secret { font-size: 1rem; letter-spacing: .05em; }
.recovery-codes { columns: 2; list-style: none; padding: 0; font-size: 1.05rem; }
.privacy-box { max-height: 26rem; overflow-y: auto; border: 1px solid var(--border); padding: 0 1rem; border-radius: var(--radius); margin-bottom: 1rem; }

/* ---------------------------------------------------------------- beheer: statistieken */
.bar-table td:first-child { white-space: nowrap; }
.bar-cell { display: flex; align-items: center; gap: .5rem; min-width: 12rem; }
.bar { display: inline-block; height: .7rem; background: var(--navy-light); border-radius: 0 4px 4px 0; width: 0; }
.bar-value { font-variant-numeric: tabular-nums; color: var(--text); }
.score-table th .score { font-size: .78rem; padding: .1rem .5rem; }
.stack { display: flex; width: 10rem; height: .8rem; background: var(--grey-bg); border-radius: 4px; overflow: hidden; gap: 2px; }
.stack span { display: block; height: 100%; width: 0; }
.stack-green { background: var(--green); }
.stack-yellow { background: #d99a17; }
.stack-red { background: var(--red); }
