/* Charte DUBERNARD — reprise de dubernard.fr (rouge #cb0e2b, bleu #045f9b, marine #032134, Roboto Condensed / Abel) */

/* Polices servies localement (licence SIL OFL) : aucun appel à Google Fonts, donc aucune IP transmise à un tiers. */
@font-face { font-family: 'Roboto Condensed'; font-style: normal; font-weight: 300 700; font-display: swap; src: url(/fonts/roboto-condensed-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Roboto Condensed'; font-style: normal; font-weight: 300 700; font-display: swap; src: url(/fonts/roboto-condensed-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Abel'; font-style: normal; font-weight: 400; font-display: swap; src: url(/fonts/abel-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --red: #cb0e2b;
  --red-dark: #a30a22;
  --red-soft: #fbe9ec;
  --blue: #045f9b;
  --blue-soft: #e7f0f7;
  --navy: #032134;
  --ink: #1d2731;
  --muted: #5b6670;
  --line: #e1e5ea;
  --bg: #f5f3ef;
  --card: #ffffff;
  --ok: #2e7d32;
  --ok-soft: #e8f4e9;
  --radius: 6px;
  --shadow: 0 1px 2px rgba(3, 33, 52, .06), 0 8px 24px rgba(3, 33, 52, .06);
  --font: 'Roboto Condensed', 'Arial Narrow', Arial, sans-serif;
  --font-alt: 'Abel', 'Roboto Condensed', sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; }
img { max-width: 100%; }
a { color: var(--blue); }
h1, h2, h3 { line-height: 1.15; margin: 0 0 .5em; }
p { margin: 0 0 1em; }
.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 760px; }
.muted { color: var(--muted); }
.small { font-size: .88rem; }
.center { text-align: center; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- En-tête (comme dubernard.fr : barre contact + logo) ---------- */
.topbar { background: var(--navy); color: #fff; font-size: .82rem; letter-spacing: .06em; text-transform: uppercase; }
.topbar .wrap { display: flex; justify-content: space-between; gap: 16px; padding-top: 7px; padding-bottom: 7px; }
.topbar a { color: #fff; text-decoration: none; opacity: .9; }
.topbar a:hover { opacity: 1; }
.topbar .links { display: flex; gap: 22px; }
.site-header { background: #fff; border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-top: 10px; padding-bottom: 10px; }
.brand { display: flex; align-items: center; gap: 14px; text-decoration: none; color: var(--navy); }
.brand img { height: 62px; width: auto; display: block; }
.brand span { font-family: var(--font-alt); font-size: 1.05rem; color: var(--muted); border-left: 1px solid var(--line); padding-left: 14px; }

/* ---------- Stepper ---------- */
.stepper { display: flex; gap: 6px; list-style: none; margin: 0; padding: 0; counter-reset: step; }
.stepper li { display: flex; align-items: center; gap: 8px; font-size: .86rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.stepper li::before {
  counter-increment: step; content: counter(step);
  width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center;
  border: 2px solid var(--line); font-weight: 700; font-size: .8rem; background: #fff;
}
.stepper li + li::after { content: none; }
.stepper li:not(:last-child) { padding-right: 10px; margin-right: 4px; border-right: 1px solid var(--line); }
.stepper li.is-done { color: var(--ok); }
.stepper li.is-done::before { content: '✓'; border-color: var(--ok); background: var(--ok); color: #fff; }
.stepper li.is-current { color: var(--red); font-weight: 700; }
.stepper li.is-current::before { border-color: var(--red); background: var(--red); color: #fff; }

/* ---------- Titres façon dubernard.fr ---------- */
.kicker { font-family: var(--font-alt); text-transform: uppercase; letter-spacing: .18em; color: var(--blue); font-size: .95rem; margin-bottom: .6em; display: block; }
.title-red { color: var(--red); text-transform: uppercase; letter-spacing: .08em; font-weight: 700; }
.rule { width: 64px; height: 3px; background: var(--blue); border: 0; margin: 14px 0 22px; }
.center .rule { margin-left: auto; margin-right: auto; }

/* ---------- Hero accueil ---------- */
.hero { background: #fff; border-bottom: 1px solid var(--line); position: relative; overflow: hidden; }
.hero::after { content: ''; position: absolute; inset: auto 0 0 0; height: 6px; background: linear-gradient(90deg, var(--red) 0 60%, var(--blue) 60% 100%); }
.hero .wrap { display: grid; grid-template-columns: 1.15fr 1fr; gap: 48px; padding-top: 56px; padding-bottom: 64px; align-items: start; }
.hero h1 { font-size: clamp(2rem, 4vw, 2.9rem); }
.hero .lead { font-size: 1.15rem; color: #34414d; }
.facts { display: flex; flex-wrap: wrap; gap: 10px; margin: 26px 0 0; padding: 0; list-style: none; }
.facts li { background: var(--blue-soft); color: var(--blue); padding: 6px 12px; border-radius: 99px; font-size: .9rem; font-weight: 700; }
.mascot { margin-top: 34px; display: flex; align-items: center; gap: 18px; color: var(--muted); font-size: .95rem; }
.mascot img { width: 92px; }

.journey { background: var(--bg); padding: 56px 0; }
.journey ol { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; counter-reset: j; }
.journey li { background: #fff; border-radius: var(--radius); padding: 22px; border-top: 4px solid var(--red); box-shadow: var(--shadow); }
.journey li::before { counter-increment: j; content: '0' counter(j); display: block; font-size: 2rem; font-weight: 700; color: var(--red); line-height: 1; margin-bottom: 10px; }
.journey h3 { font-size: 1.1rem; text-transform: uppercase; letter-spacing: .04em; color: var(--navy); }
.journey p { color: var(--muted); font-size: .95rem; margin: 0; }

/* ---------- Cartes & formulaires ---------- */
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 28px; border: 1px solid var(--line); }
.card h2 { font-size: 1.35rem; color: var(--navy); }
.card-accent { border-top: 4px solid var(--red); }
.page { padding: 44px 0 64px; }
.page-head { margin-bottom: 28px; }
.page-head h1 { font-size: clamp(1.7rem, 3vw, 2.3rem); color: var(--navy); }

.field { margin-bottom: 16px; }
.field label, .label { display: block; font-weight: 700; font-size: .92rem; margin-bottom: 6px; color: var(--navy); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=file], select, textarea {
  width: 100%; font: inherit; font-size: 1rem; padding: 11px 12px; border: 1px solid #c9d0d7; border-radius: 4px; background: #fff; color: var(--ink);
}
textarea { min-height: 96px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--blue); outline-offset: 1px; border-color: var(--blue); }
input[readonly] { background: #f1f3f5; color: var(--muted); }
.error-text { color: var(--red); font-size: .86rem; margin-top: 4px; }
.has-error input { border-color: var(--red); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: .95rem; cursor: pointer; }
.field label.check { font-weight: 400; color: var(--ink); font-size: .95rem; }
.check input { margin-top: 4px; width: 18px; height: 18px; accent-color: var(--red); flex: none; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; font-size: .95rem;
  padding: 13px 26px; border-radius: 4px; border: 2px solid var(--red); background: var(--red); color: #fff;
  cursor: pointer; text-decoration: none; transition: background .15s, border-color .15s, color .15s;
}
.btn:hover { background: var(--red-dark); border-color: var(--red-dark); }
.btn:disabled, .btn[aria-disabled=true] { background: #c3c8cd; border-color: #c3c8cd; cursor: not-allowed; }
.btn-block { width: 100%; }
.btn-ghost { background: transparent; color: var(--red); }
.btn-ghost:hover { background: var(--red-soft); color: var(--red-dark); }
.btn-blue { background: var(--blue); border-color: var(--blue); }
.btn-blue:hover { background: #034a79; border-color: #034a79; }
.btn-sm { padding: 7px 14px; font-size: .8rem; }
.actions { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-top: 22px; }

.notice { padding: 14px 16px; border-radius: 4px; border-left: 4px solid var(--blue); background: var(--blue-soft); margin-bottom: 20px; }
.notice.error { border-color: var(--red); background: var(--red-soft); }
.notice.ok { border-color: var(--ok); background: var(--ok-soft); }

/* ---------- Lecteur vidéo ---------- */
.video-list { display: grid; gap: 24px; }
.video-card { padding: 0; overflow: hidden; }
.video-card header { display: flex; justify-content: space-between; gap: 16px; align-items: center; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.video-card header h2 { margin: 0; font-size: 1.2rem; }
.video-card .desc { padding: 0 22px 18px; margin: 0; color: var(--muted); }
.badge { display: inline-flex; align-items: center; gap: 6px; font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; font-weight: 700; padding: 4px 10px; border-radius: 99px; background: #eef1f4; color: var(--muted); white-space: nowrap; }
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.red { background: var(--red-soft); color: var(--red); }
.badge.blue { background: var(--blue-soft); color: var(--blue); }

.player { position: relative; background: #000; aspect-ratio: 16 / 9; }
.player video { width: 100%; height: 100%; display: block; }
.player .overlay {
  position: absolute; inset: 0; display: grid; place-items: center; background: rgba(3, 33, 52, .35); border: 0; cursor: pointer; color: #fff; font: inherit;
}
.player .overlay .big { width: 84px; height: 84px; border-radius: 50%; background: var(--red); display: grid; place-items: center; box-shadow: 0 6px 24px rgba(0,0,0,.35); }
.player .overlay svg { width: 34px; height: 34px; fill: #fff; margin-left: 5px; }
.player.is-playing .overlay { display: none; }
.player.is-locked { display: grid; place-items: center; color: #fff; background: var(--navy); }
.controls { display: flex; align-items: center; gap: 12px; padding: 10px 14px; background: var(--navy); color: #fff; }
.controls button { background: none; border: 0; color: #fff; cursor: pointer; padding: 4px; display: grid; place-items: center; }
.controls button svg { width: 22px; height: 22px; fill: currentColor; }
.controls .time { font-variant-numeric: tabular-nums; font-size: .88rem; min-width: 96px; }
.track { position: relative; flex: 1; height: 8px; background: rgba(255,255,255,.18); border-radius: 99px; cursor: pointer; }
.track .watched { position: absolute; inset: 0 auto 0 0; background: rgba(255,255,255,.35); border-radius: 99px; }
.track .played { position: absolute; inset: 0 auto 0 0; background: var(--red); border-radius: 99px; }
.track .knob { position: absolute; top: 50%; width: 14px; height: 14px; margin: -7px 0 0 -7px; background: #fff; border-radius: 50%; }
.player-hint { padding: 10px 22px; font-size: .86rem; color: var(--muted); background: #fafbfc; border-top: 1px solid var(--line); margin: 0; min-height: 40px; }
.player-hint.warn { color: var(--red); }
.next-step { margin-top: 28px; display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }

/* ---------- Questionnaire ---------- */
.question { margin-bottom: 18px; }
.question legend { font-weight: 700; font-size: 1.1rem; color: var(--navy); padding: 0; margin-bottom: 4px; }
.question fieldset { border: 0; margin: 0; padding: 0; }
.question .hint { font-size: .85rem; color: var(--muted); margin-bottom: 12px; display: block; }
.qnum { color: var(--red); margin-right: 6px; }
.choice { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border: 1px solid var(--line); border-radius: 4px; margin-bottom: 8px; cursor: pointer; transition: border-color .15s, background .15s; }
.choice:hover { border-color: var(--blue); }
.choice input { width: 18px; height: 18px; accent-color: var(--red); flex: none; }
.choice:has(input:checked) { border-color: var(--red); background: var(--red-soft); }
.result-item { border-left: 4px solid var(--line); padding: 10px 16px; margin-bottom: 12px; background: #fff; }
.result-item.ok { border-color: var(--ok); }
.result-item.ko { border-color: var(--red); }
.score { font-size: 3rem; font-weight: 700; line-height: 1; }
.score.ok { color: var(--ok); }
.score.ko { color: var(--red); }

/* ---------- Fin ---------- */
.done-hero { text-align: center; }
.done-hero .seal { width: 84px; height: 84px; border-radius: 50%; background: var(--ok); color: #fff; display: grid; place-items: center; margin: 0 auto 18px; font-size: 2.6rem; }
.cert-preview { display: flex; gap: 20px; align-items: center; justify-content: space-between; flex-wrap: wrap; border: 1px dashed #c9d0d7; padding: 18px 20px; border-radius: var(--radius); background: #fcfcfd; margin: 26px 0; text-align: left; }
.cert-preview strong { color: var(--navy); font-size: 1.1rem; display: block; }
.rating { display: flex; gap: 10px; justify-content: center; margin: 14px 0 18px; }
.rating label { cursor: pointer; }
.rating input { position: absolute; opacity: 0; }
.rating span { display: grid; place-items: center; width: 58px; height: 58px; border-radius: 50%; font-size: 1.9rem; border: 2px solid var(--line); background: #fff; transition: transform .1s; }
.rating input:checked + span { border-color: var(--red); background: var(--red-soft); transform: scale(1.08); }
.rating input:focus-visible + span { outline: 2px solid var(--blue); outline-offset: 2px; }

/* ---------- Pied de page ---------- */
.site-footer { background: var(--navy); color: #c9d4dd; margin-top: auto; font-size: .9rem; }
.site-footer .wrap { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding-top: 26px; padding-bottom: 26px; flex-wrap: wrap; }
.site-footer img { height: 34px; }
.site-footer a { color: #fff; }

/* ---------- Administration ---------- */
.admin-body { background: #f3f5f8; }
.admin-shell { display: grid; grid-template-columns: 236px 1fr; min-height: 100vh; }
.admin-nav { background: var(--navy); color: #fff; padding: 20px 14px; position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; }
.admin-nav .logo { display: block; background: #fff; border-radius: 4px; padding: 10px; margin-bottom: 22px; text-align: center; }
.admin-nav .logo img { height: 54px; }
.admin-nav a { display: block; color: #c9d4dd; text-decoration: none; padding: 9px 12px; border-radius: 4px; font-size: .96rem; margin-bottom: 2px; }
.admin-nav a:hover { background: rgba(255,255,255,.07); color: #fff; }
.admin-nav a.active { background: var(--red); color: #fff; }
.admin-nav .foot { margin-top: auto; font-size: .82rem; color: #8ea2b2; padding: 0 12px; }
.admin-nav .foot a { padding: 6px 0; color: #fff; }
.admin-main { padding: 28px 34px 60px; min-width: 0; max-width: 1400px; }
.admin-main h1 { font-size: 1.8rem; color: var(--navy); margin-bottom: 4px; }
.admin-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 22px; }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.kpi .v { font-size: 2rem; font-weight: 700; color: var(--navy); line-height: 1.1; }
.kpi .l { color: var(--muted); font-size: .86rem; text-transform: uppercase; letter-spacing: .04em; }
.kpi.accent { border-top: 3px solid var(--red); }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.funnel { display: grid; gap: 10px; }
.funnel .row { display: grid; grid-template-columns: 150px 1fr 48px; gap: 12px; align-items: center; font-size: .92rem; }
.funnel .bar { height: 12px; background: #eef1f4; border-radius: 99px; overflow: hidden; }
.funnel .bar i { display: block; height: 100%; background: var(--blue); border-radius: 99px; }
.funnel .row:last-child .bar i { background: var(--ok); }
table.data { width: 100%; border-collapse: collapse; background: #fff; font-size: .93rem; }
table.data th { text-align: left; font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 700; padding: 10px 12px; border-bottom: 2px solid var(--line); white-space: nowrap; }
table.data td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.data tr:hover td { background: #fafbfc; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; align-items: center; }
.toolbar input[type=text] { max-width: 280px; padding: 8px 10px; }
.toolbar select { width: auto; padding: 8px 10px; }
.tabs { display: flex; gap: 4px; }
.tabs a { padding: 7px 14px; border-radius: 99px; text-decoration: none; color: var(--muted); font-size: .9rem; }
.tabs a.active { background: var(--navy); color: #fff; }
.inline { display: inline; }
.link-btn { background: none; border: 0; padding: 0; color: var(--blue); cursor: pointer; font: inherit; text-decoration: underline; }
.link-btn.danger { color: var(--red); }
.answer-row { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; align-items: center; margin-bottom: 8px; }
.answer-row .check { white-space: nowrap; font-size: .9rem; }
.settings-group { margin-bottom: 22px; }
.settings-group h2 { font-size: 1.1rem; text-transform: uppercase; letter-spacing: .06em; color: var(--red); }
.video-admin { display: grid; grid-template-columns: 220px 1fr; gap: 20px; align-items: start; }
.video-admin video { width: 100%; border-radius: 4px; background: #000; }
.qr-box { text-align: center; }
.qr-box img { width: 260px; height: 260px; border: 1px solid var(--line); border-radius: 4px; }
code.token { word-break: break-all; background: #f1f3f5; padding: 6px 8px; border-radius: 4px; display: block; font-size: .85rem; }
.empty { padding: 30px; text-align: center; color: var(--muted); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero .wrap { grid-template-columns: 1fr; gap: 32px; padding-top: 36px; }
  .journey ol { grid-template-columns: 1fr 1fr; }
  .kpis { grid-template-columns: 1fr 1fr; }
  .two-col { grid-template-columns: 1fr; }
  .admin-shell { grid-template-columns: 1fr; }
  .admin-nav { position: static; height: auto; flex-direction: row; flex-wrap: wrap; gap: 4px; align-items: center; }
  .admin-nav .logo { display: none; }
  .admin-nav .foot { margin: 0 0 0 auto; }
  .admin-main { padding: 20px 16px 48px; }
  .video-admin { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .wrap { padding: 0 16px; }
  .topbar .hide-sm, .brand span { display: none; }
  .stepper li { font-size: 0; gap: 0; }
  .stepper li:not(:last-child) { padding-right: 6px; margin-right: 0; }
  .grid-2, .journey ol { grid-template-columns: 1fr; }
  .card { padding: 20px; }
  .controls .time { min-width: 0; font-size: .78rem; }
  .answer-row { grid-template-columns: 1fr auto; }
}

/* Pied de page : pages annexes */
.footer-links { display: flex; flex-wrap: wrap; gap: 6px 18px; flex-basis: 100%; order: 3; border-top: 1px solid rgba(255,255,255,.12); padding-top: 14px; }
.footer-links a { color: #c9d4dd; text-decoration: none; }
.footer-links a:hover { color: #fff; text-decoration: underline; }

/* Pages éditables */
.prose h2 { font-size: 1.25rem; color: var(--navy); margin: 1.4em 0 .4em; }
.prose h3 { font-size: 1.05rem; color: var(--blue); margin: 1.2em 0 .3em; }
.prose > :first-child { margin-top: 0; }
.prose p { margin: .5em 0; }
.prose ul { margin: .4em 0 .8em; padding-left: 1.3em; }
.prose li { margin: .2em 0; }

/* Enquête de satisfaction */
.survey-q { border: 0; padding: 0 0 18px; margin: 0 0 18px; border-bottom: 1px solid var(--line); min-width: 0; }
.survey-q legend { font-weight: 700; color: var(--navy); padding: 0; margin-bottom: 10px; display: flex; gap: 10px; align-items: baseline; }
.survey-q .num { display: inline-grid; place-items: center; flex: none; width: 26px; height: 26px; border-radius: 50%; background: var(--blue-soft); color: var(--blue); font-size: .85rem; }
.survey-q.has-error legend { color: var(--red); }
.survey-q textarea { width: 100%; }
.req { color: var(--red); }
.options { display: flex; flex-wrap: wrap; gap: 8px; }
.option { cursor: pointer; }
.option input { position: absolute; opacity: 0; }
.option span { display: inline-block; padding: 8px 14px; border: 2px solid var(--line); border-radius: 999px; background: #fff; font-size: .95rem; transition: border-color .1s, background .1s; }
.option input:checked + span { border-color: var(--red); background: var(--red-soft); color: var(--red-dark); font-weight: 700; }
.option input:focus-visible + span { outline: 2px solid var(--blue); outline-offset: 2px; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* Admin : synthèse de l'enquête */
.survey-bars .row { display: grid; grid-template-columns: minmax(140px, 260px) 1fr 70px; gap: 10px; align-items: center; margin: 4px 0; font-size: .92rem; }
.survey-bars .bar { height: 10px; background: var(--line); border-radius: 5px; overflow: hidden; }
.survey-bars .bar i { display: block; height: 100%; background: var(--blue); }
@media (max-width: 640px) { .survey-bars .row { grid-template-columns: 1fr 50px; } .survey-bars .bar { grid-column: 1 / -1; grid-row: 2; } }
