/* Déclaration de déplacement - FFBillard
   Couleurs reprises du logo : bleu FFB, rouge FFB, blanc. */
:root {
  --bleu: #065da8;
  --bleu-vif: #0a74d1;
  --bleu-fonce: #021f38;
  --bleu-nuit: #053d70;
  --bleu-clair: #e8f1fa;
  --rouge: #e10a19;
  --texte: #1b2430;
  --muted: #5b6675;
  --bord: #dde4ec;
  --fond: #f4f7fb;
  --blanc: #ffffff;
  --ok: #1d7f38;      --ok-bg: #e6f4ea;
  --err: #b3121f;     --err-bg: #fdecee;
  --warn: #8a5a00;    --warn-bg: #fff4dc;
  --info: #0d4f8b;    --info-bg: #e8f1fa;
  --radius: 14px;
  --radius-sm: 10px;
  --ombre: 0 1px 2px rgba(2, 31, 56, .05), 0 6px 20px rgba(2, 31, 56, .06);
  --ombre-forte: 0 2px 4px rgba(2, 31, 56, .06), 0 14px 34px rgba(2, 31, 56, .10);
  --degrade: linear-gradient(120deg, var(--bleu-fonce) 0%, var(--bleu-nuit) 55%, var(--bleu) 100%);
  /* Billes de carambole (blanche, jaune, rouge) */
  --billes: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 200'%3E%3Cdefs%3E%3CradialGradient id='w' cx='35%25' cy='30%25' r='75%25'%3E%3Cstop offset='0' stop-color='%23fff'/%3E%3Cstop offset='1' stop-color='%23c7d3e0'/%3E%3C/radialGradient%3E%3CradialGradient id='r' cx='35%25' cy='30%25' r='75%25'%3E%3Cstop offset='0' stop-color='%23ff6b74'/%3E%3Cstop offset='1' stop-color='%23b00813'/%3E%3C/radialGradient%3E%3CradialGradient id='y' cx='35%25' cy='30%25' r='75%25'%3E%3Cstop offset='0' stop-color='%23fff0a6'/%3E%3Cstop offset='1' stop-color='%23d9a400'/%3E%3C/radialGradient%3E%3C/defs%3E%3Ccircle cx='62' cy='122' r='40' fill='url(%23w)'/%3E%3Ccircle cx='138' cy='66' r='40' fill='url(%23r)'/%3E%3Ccircle cx='150' cy='156' r='30' fill='url(%23y)'/%3E%3C/svg%3E");
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; color: var(--texte);
  background: var(--fond) radial-gradient(1200px 380px at 50% -120px, #dfeaf6 0%, rgba(223, 234, 246, 0) 70%) no-repeat;
  font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, "Trebuchet MS", Arial, sans-serif;
}
a { color: var(--bleu); text-underline-offset: 2px; }
a:hover { color: var(--bleu-vif); }
h1 { font-size: 1.75rem; line-height: 1.2; margin: 1.4rem 0 1rem; color: var(--bleu-fonce); font-weight: 800; letter-spacing: -.015em; }
h2 { font-size: 1.22rem; margin: 0 0 1rem; color: var(--bleu-fonce); font-weight: 750; letter-spacing: -.01em; }
h3 { font-size: .85rem; margin: 1.5rem 0 .6rem; color: var(--bleu); text-transform: uppercase; letter-spacing: .06em; font-weight: 750; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 16px; }
body.public .wrap { max-width: 840px; }
main.wrap { padding-bottom: 48px; min-height: 60vh; }
.muted { color: var(--muted); }
small { font-size: .85em; }
pre { white-space: pre-wrap; font: inherit; margin: .3rem 0 0; color: var(--muted); }
code { background: var(--bleu-clair); padding: 1px 6px; border-radius: 6px; }
::selection { background: #065da833; }

/* En-tête */
.test-banner { background: repeating-linear-gradient(-45deg, #ffcc00 0 18px, #ffd633 18px 36px); color: #3d2f00; text-align: center; font-weight: 700; padding: 6px 12px; font-size: .9rem; }
.site-header { background: var(--degrade); color: #fff; border-bottom: 4px solid var(--rouge); box-shadow: 0 4px 18px rgba(2, 31, 56, .18); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 72px; }
.brand { display: flex; align-items: center; gap: 14px; color: #fff; text-decoration: none; }
.brand:hover { color: #fff; }
.brand img { display: block; height: 46px; width: auto; border-radius: 6px; box-shadow: 0 2px 8px rgba(0, 0, 0, .25); }
.brand span { display: flex; flex-direction: column; line-height: 1.2; }
.brand strong { font-size: 1.08rem; font-weight: 750; letter-spacing: -.01em; }
.brand small { color: #bcd0e6; font-size: .8rem; }
.header-link { color: #fff; font-weight: 600; text-decoration: none; padding: 7px 16px; background: #ffffff1a; border: 1px solid #ffffff40; border-radius: 999px; transition: background .15s; }
.header-link:hover { background: #ffffff33; color: #fff; }
.admin-nav { background: #00000026; border-top: 1px solid #ffffff14; }
.admin-nav .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; padding-top: 6px; padding-bottom: 6px; }
.ico { width: 1.15em; height: 1.15em; flex: none; vertical-align: -.2em; }
.admin-nav a { display: inline-flex; align-items: center; gap: 7px; color: #e3edf8; text-decoration: none; padding: 7px 14px; font-weight: 600; font-size: .93rem; border-radius: 999px; transition: background .15s, color .15s; }
.admin-nav a:hover { background: #ffffff1f; color: #fff; }
.admin-nav a .ico { opacity: .8; }
.admin-nav a.active { background: #fff; color: var(--bleu-fonce); box-shadow: 0 2px 8px rgba(0, 0, 0, .15); }
.admin-nav a.active .ico { color: var(--bleu); opacity: 1; }
.nav-user { margin-left: auto; font-size: .88rem; color: #cfdeef; padding: 7px 0; }
.nav-user a { display: inline-flex; gap: 5px; align-items: center; padding: 0; text-decoration: underline; font-weight: 400; color: #fff; }
.nav-user a .ico { width: 1em; height: 1em; }
.nav-user a:hover { background: none; }
.nav-toggle { display: none; background: #ffffff1a; border: 1px solid #ffffff40; color: #fff; font-size: 1.3rem; border-radius: 10px; padding: 2px 12px; }

.site-footer { color: var(--muted); font-size: .85rem; padding: 24px 0 32px; text-align: center; }
.site-footer .wrap::before { content: ""; display: block; width: 48px; height: 3px; margin: 0 auto 14px; border-radius: 3px; background: linear-gradient(90deg, var(--bleu) 50%, var(--rouge) 50%); }

/* Bandeau d'accueil */
.hero { position: relative; overflow: hidden; background: var(--degrade); color: #fff; border-radius: 20px; padding: 28px 200px 26px 30px; margin: 26px 0 22px; box-shadow: var(--ombre-forte); }
.hero::after { content: ""; position: absolute; right: -10px; top: 50%; width: 190px; height: 190px; transform: translateY(-50%) rotate(-8deg); background: var(--billes) center / contain no-repeat; opacity: .95; pointer-events: none; }
.hero h1 { color: #fff; margin: 0 0 .5rem; }
.hero p { margin: .5rem 0 0; color: #e3edf8; }
.hero strong { color: #fff; }
.hero .muted { color: #bcd0e6; font-size: .95rem; }
.hero a { color: #fff; font-weight: 600; }
.hero a:hover { color: #fff; text-decoration-thickness: 2px; }
.hero .lead { font-size: 1.05rem; }

/* Cartes et alertes */
.card { background: var(--blanc); border: 1px solid #e6ecf2; border-radius: var(--radius); padding: 24px; margin-bottom: 20px; box-shadow: var(--ombre); }
.card.narrow, form.narrow { max-width: 520px; }
.card-danger { border-color: #f1b9be; box-shadow: 0 0 0 3px #fdecee, var(--ombre); }
.alert { padding: 13px 16px; border-radius: var(--radius-sm); margin: 0 0 16px; border: 1px solid transparent; border-left: 5px solid; }
.alert-ok { background: var(--ok-bg); border-color: #b9e0c4; border-left-color: var(--ok); color: #124d23; }
.alert-err { background: var(--err-bg); border-color: #f5c6cb; border-left-color: var(--err); color: #7d0c15; }
.alert-warn { background: var(--warn-bg); border-color: #f3dca4; border-left-color: #d99a00; color: #5c3c00; }
.alert-info { background: var(--info-bg); border-color: #c4daf0; border-left-color: var(--bleu); color: #0a3a66; }
.lead { font-size: 1.05rem; }

.licence-result { border-radius: var(--radius); padding: 15px 16px 15px 60px; margin-bottom: 18px; position: relative; border: 1px solid; }
.licence-result::before { position: absolute; left: 16px; top: 14px; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-size: 1rem; font-weight: 800; line-height: 1; color: #fff; }
.licence-result strong { font-size: 1.05rem; }
.licence-result p { margin: .3rem 0 0; }
.licence-ok { background: var(--ok-bg); border-color: #9fd3ae; } .licence-ok::before { content: "✓"; background: var(--ok); }
.licence-err { background: var(--err-bg); border-color: #f1b9be; } .licence-err::before { content: "✕"; background: var(--err); }
.licence-warn { background: var(--warn-bg); border-color: #f0d391; } .licence-warn::before { content: "!"; background: #d99a00; }
.licence-info { background: var(--info-bg); border-color: #b5cfe9; } .licence-info::before { content: "i"; background: var(--info); }

/* Étapes */
.steps { list-style: none; display: flex; gap: 10px; padding: 0; margin: 0 0 22px; counter-reset: s; }
.steps li { flex: 1; display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: var(--blanc); border: 1px solid #e6ecf2; border-radius: 999px; color: var(--muted); font-weight: 600; font-size: .95rem; box-shadow: var(--ombre); }
.steps li span { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--fond); border: 1px solid var(--bord); font-size: .85rem; font-weight: 700; flex: none; }
.steps li.current { background: var(--bleu); border-color: var(--bleu); color: #fff; box-shadow: 0 6px 18px rgba(6, 93, 168, .30); }
.steps li.current span { background: #fff; color: var(--bleu); border-color: #fff; }
.steps li.done { color: var(--ok); }
.steps li.done span { background: var(--ok); color: #fff; border-color: var(--ok); font-size: 0; }
.steps li.done span::after { content: "✓"; font-size: .9rem; }

.code-input { max-width: 240px; font-size: 1.7rem !important; letter-spacing: .35em; text-align: center; font-variant-numeric: tabular-nums; font-weight: 700; }
.code-debug { font-size: 1.2rem; letter-spacing: .15em; }
.resend { text-align: center; color: var(--muted); margin: -4px 0 18px; }
.linklike { background: none; border: 0; padding: 0; font: inherit; color: var(--bleu); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.identity-strip { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; background: var(--blanc); border: 1px solid #e6ecf2; border-left: 5px solid var(--bleu); border-radius: var(--radius-sm); padding: 12px 16px; margin-bottom: 18px; box-shadow: var(--ombre); }

/* Formulaires */
.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 650; margin-bottom: 7px; }
.field .hint { font-weight: 400; color: var(--muted); font-size: .88rem; }
.req { color: var(--rouge); }
input[type=text], input[type=email], input[type=tel], input[type=date], input[type=number], input[type=password], input[type=file], input:not([type]), select, textarea {
  width: 100%; font: inherit; color: var(--texte); background: #fbfcfe;
  border: 1px solid #c9d3df; border-radius: var(--radius-sm); padding: 10px 13px; min-height: 46px;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
input[type=file] { padding: 8px; background: var(--fond); border-style: dashed; cursor: pointer; }
input:hover, select:hover, textarea:hover { border-color: #9fb0c3; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--bleu); background: #fff; box-shadow: 0 0 0 4px #065da826; }
.has-error input, .has-error select, .has-error textarea { border-color: var(--err); background: #fffafa; }
.has-error input:focus, .has-error select:focus, .has-error textarea:focus { box-shadow: 0 0 0 4px #b3121f22; }
.error-msg { color: var(--err); font-size: .9rem; margin: 6px 0 0; font-weight: 600; }
.overlap-warn ul { margin: 6px 0 8px; padding-left: 20px; }
.field-note { margin: 7px 0 0; padding: 7px 11px; font-size: .88rem; line-height: 1.4; color: #5c3c00; background: var(--warn-bg); border-left: 3px solid #d99a00; border-radius: 6px; }
.field.check label { font-weight: 400; display: flex; gap: 10px; align-items: flex-start; cursor: pointer; }
.field.check input { width: 20px; height: 20px; margin-top: 2px; flex: none; accent-color: var(--bleu); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
.row3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 18px; }
.actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; margin-top: 22px; }
.checks { display: flex; flex-direction: column; gap: 6px; }
.checks label { font-weight: 400; }
.checks input { accent-color: var(--bleu); }
.map-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 0 16px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; font: inherit; font-weight: 650; text-decoration: none; cursor: pointer;
  padding: 10px 22px; min-height: 46px; border-radius: 999px; border: 1px solid #c9d3df; background: #fff; color: var(--bleu-fonce);
  transition: background .15s, box-shadow .15s, transform .15s, border-color .15s; }
.btn:hover { background: var(--fond); border-color: #9fb0c3; color: var(--bleu-fonce); }
.btn:focus-visible { outline: none; box-shadow: 0 0 0 4px #065da840; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: linear-gradient(180deg, var(--bleu-vif), var(--bleu)); border-color: var(--bleu); color: #fff; box-shadow: 0 4px 14px rgba(6, 93, 168, .30); }
.btn-primary:hover { background: linear-gradient(180deg, #0b7ee3, #054d8c); border-color: #054d8c; color: #fff; box-shadow: 0 6px 20px rgba(6, 93, 168, .38); transform: translateY(-1px); }
.btn-danger { background: var(--err); border-color: var(--err); color: #fff; box-shadow: 0 4px 14px rgba(179, 18, 31, .25); }
.btn-danger:hover { background: #8f0e19; border-color: #8f0e19; color: #fff; }
.btn-small { padding: 4px 12px; min-height: 32px; font-size: .88rem; box-shadow: none; }
.btn-small:hover { transform: none; }

/* Récapitulatif */
.summary { display: grid; grid-template-columns: minmax(150px, 34%) 1fr; margin: 0; }
.summary dt, .summary dd { padding: 9px 0; border-bottom: 1px solid #edf0f4; margin: 0; }
.summary dt { color: var(--muted); padding-right: 12px; }
.summary dd { word-break: break-word; font-weight: 500; }
.edit-link { font-size: .8rem; text-transform: none; letter-spacing: 0; font-weight: 500; margin-left: 8px; }
.confirm { text-align: center; padding: 36px 24px; }
.confirm-icon { width: 72px; height: 72px; margin: 0 auto 14px; border-radius: 50%; background: linear-gradient(160deg, #2fa653, var(--ok)); color: #fff; display: grid; place-items: center; font-size: 2.1rem; box-shadow: 0 8px 24px rgba(29, 127, 56, .35); animation: pop .45s cubic-bezier(.2, 1.4, .4, 1) both; }
@keyframes pop { from { transform: scale(.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.decl-num { display: inline-block; font-size: 1.3rem; color: var(--bleu); letter-spacing: .04em; background: var(--bleu-clair); padding: 2px 12px; border-radius: 999px; }

/* Admin */
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.head-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.count { font-size: .9rem; background: var(--bleu-clair); color: var(--bleu); padding: 2px 10px; border-radius: 99px; vertical-align: middle; font-weight: 700; }
.filters { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 0 14px; align-items: end; }
.filters .field { margin-bottom: 12px; }
.filters label { font-size: .85rem; }
.filters input, .filters select { padding: 8px 10px; min-height: 40px; }
.filter-actions { margin-bottom: 12px; display: flex; gap: 12px; align-items: center; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
.table-wrap { overflow-x: auto; background: var(--blanc); border: 1px solid #e6ecf2; border-radius: var(--radius); box-shadow: var(--ombre); }
.card .table-wrap { border: 0; box-shadow: none; }
table.data { width: 100%; border-collapse: collapse; font-size: .93rem; }
table.data th { text-align: left; background: #f6f9fc; color: var(--muted); font-weight: 650; font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; padding: 11px 12px; border-bottom: 1px solid var(--bord); white-space: nowrap; }
table.data td { padding: 11px 12px; border-bottom: 1px solid #edf0f4; vertical-align: top; }
table.data tbody tr:last-child td { border-bottom: 0; }
table.data tbody tr[onclick] { cursor: pointer; transition: background .12s; }
table.data tbody tr[onclick]:hover { background: #f2f7fd; }
table.data tr.cancelled td { color: var(--muted); }
table.data tr.cancelled td:not(:first-child) { text-decoration: line-through; text-decoration-color: #9aa5b1; }
table.compact td, table.compact th { padding: 7px 10px; }
td.empty { text-align: center; color: var(--muted); padding: 30px; }
.badge { display: inline-block; padding: 2px 9px; border-radius: 99px; font-size: .78rem; font-weight: 700; white-space: nowrap; }
.badge-ok { background: var(--ok-bg); color: var(--ok); }
.badge-err { background: var(--err-bg); color: var(--err); }
.badge-warn { background: var(--warn-bg); color: var(--warn); }
.badge-info { background: var(--info-bg); color: var(--info); }
.pager { display: flex; gap: 4px; flex-wrap: wrap; margin: 16px 0; }
.pager a { padding: 6px 13px; border: 1px solid var(--bord); border-radius: 999px; background: #fff; text-decoration: none; }
.pager a.active { background: var(--bleu); color: #fff; border-color: var(--bleu); }
.tabs { display: inline-flex; gap: 4px; margin-bottom: 14px; flex-wrap: wrap; background: #e9eff6; padding: 4px; border-radius: 999px; }
.tabs a { padding: 7px 16px; border-radius: 999px; text-decoration: none; font-weight: 650; color: var(--bleu-fonce); }
.tabs a:hover { background: #ffffffa0; }
.tabs a.active { background: #fff; color: var(--bleu); box-shadow: 0 1px 4px rgba(2, 31, 56, .12); }
.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li { position: relative; padding: 10px 0 10px 20px; border-left: 2px solid var(--bleu-clair); margin-left: 6px; }
.timeline li::before { content: ""; position: absolute; left: -6px; top: 16px; width: 10px; height: 10px; border-radius: 50%; background: var(--bleu); box-shadow: 0 0 0 3px #fff; }
details summary { cursor: pointer; color: var(--bleu); }
details.inline, form.inline { display: inline-block; vertical-align: top; margin: 2px; }
details.inline summary { list-style: none; }
details.inline form { margin-top: 6px; display: flex; gap: 6px; }
details.inline input { min-width: 200px; padding: 6px 8px; min-height: 32px; }
.mail-body { background: #f6f9fc; padding: 12px; border-radius: var(--radius-sm); max-width: 560px; font-size: .85rem; color: var(--texte); }
.inline-form { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; margin-top: 16px; }
.inline-form .field { flex: 1; min-width: 200px; margin: 0; }
.add-admin { margin-top: 18px; border-top: 1px solid var(--bord); padding-top: 4px; }
.login-card { max-width: 430px; margin: 48px auto; border-top: 5px solid var(--bleu); }
ul.plain { padding-left: 18px; }
.howto { padding-left: 20px; margin-top: 0; }

/* Qui est à l'étranger */
.abroad { border-left: 5px solid var(--bleu); }
.abroad summary { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; color: var(--bleu-fonce); }
.abroad-ico { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: linear-gradient(160deg, var(--bleu-vif), var(--bleu)); color: #fff; margin-right: 4px; }
.abroad-ico .ico { width: 19px; height: 19px; }
.abroad[open] summary { margin-bottom: 4px; }
.abroad h3 { margin-top: .8rem; }
.abroad-list { list-style: none; padding: 0; margin: 0; }
.abroad-list li { padding: 9px 0; border-bottom: 1px solid #edf0f4; }
.abroad-list li:last-child { border-bottom: 0; }

/* Statistiques */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; margin-bottom: 20px; }
.kpi { position: relative; overflow: hidden; background: var(--blanc); border: 1px solid #e6ecf2; border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--ombre); }
.kpi::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: linear-gradient(180deg, var(--bleu), var(--rouge)); }
.kpi b { display: block; font-size: 1.9rem; line-height: 1.1; color: var(--bleu-fonce); font-variant-numeric: tabular-nums; font-weight: 800; letter-spacing: -.02em; }
.kpi span { color: var(--muted); font-size: .9rem; }
.kpi:has(> .ico) { padding-right: 64px; }
.kpi > .ico { position: absolute; right: 14px; top: 14px; width: 38px; height: 38px; padding: 8px; border-radius: 12px; background: var(--bleu-clair); color: var(--bleu); }
.kpi-muted > .ico { background: var(--err-bg); color: var(--err); }
.bars { width: 100%; border-collapse: collapse; font-size: .93rem; }
.bars td { padding: 5px 0; vertical-align: middle; }
.bars td:first-child { width: 38%; padding-right: 10px; }
.bars td:last-child { width: 48px; text-align: right; font-variant-numeric: tabular-nums; font-weight: 700; }
.bar { height: 14px; background: linear-gradient(90deg, var(--bleu), var(--bleu-vif)); border-radius: 999px; min-width: 4px; }
.bar-track { background: var(--bleu-clair); border-radius: 999px; }

/* Aide */
.help h2 { margin-top: 1.8rem; }
.help .card h2 { margin-top: 0; }
.help ol li, .help ul li { margin-bottom: .4rem; }
.help .toc { columns: 2; }
.help-title { display: flex; align-items: center; gap: 12px; }
.help-icon { display: grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: 12px; background: var(--bleu-clair); color: var(--bleu); }
.help-icon svg { width: 22px; height: 22px; }
.help-icon-step { background: linear-gradient(160deg, var(--bleu-vif), var(--bleu)); color: #fff; box-shadow: 0 4px 12px rgba(6, 93, 168, .28); }

/* Animations discrètes (désactivées si l'utilisateur le demande) */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* Téléphones et tablettes */
@media (max-width: 760px) {
  h1 { font-size: 1.4rem; }
  .row2, .row3, .grid2 { grid-template-columns: 1fr; }
  .card { padding: 18px; }
  .hero { padding: 22px 20px; margin-top: 18px; border-radius: 16px; }
  .hero::after { width: 110px; height: 110px; right: -28px; top: -18px; transform: rotate(-8deg); opacity: .35; }
  .steps { gap: 6px; }
  .steps li { flex-direction: column; text-align: center; gap: 4px; font-size: .78rem; padding: 8px 4px; border-radius: var(--radius-sm); }
  .brand small { display: none; }
  .brand img { height: 38px; }
  .summary { grid-template-columns: 1fr; }
  .summary dt { border-bottom: 0; padding-bottom: 0; font-size: .85rem; }
  .actions { flex-direction: column-reverse; }
  .actions .btn { width: 100%; }
  .nav-toggle { display: block; }
  .admin-nav { display: none; }
  body.nav-open .admin-nav { display: block; }
  .admin-nav .wrap { flex-direction: column; align-items: stretch; }
  .nav-user { margin: 0; padding: 10px 14px; }
  .help .toc { columns: 1; }
  /* Tableaux en cartes */
  table.data thead { display: none; }
  table.data, table.data tbody, table.data tr, table.data td { display: block; width: 100%; }
  table.data tr { border-bottom: 1px solid var(--bord); padding: 8px 0; }
  table.data td { border: 0; padding: 3px 12px; }
  table.data td[data-label]::before { content: attr(data-label); display: block; font-size: .75rem; color: var(--muted); text-transform: uppercase; }
  table.data tbody tr { background: var(--blanc); }
  /* Déclaration annulée : sur téléphone, grisée plutôt que barrée (sinon les intitulés seraient barrés aussi) */
  table.data tr.cancelled td:not(:first-child) { text-decoration: none; opacity: .55; }
  .admin-nav a { padding: 10px 14px; }
}

/* Impression / PDF */
@media print {
  @page { margin: 15mm; }
  body { background: #fff; font-size: 11pt; }
  .test-banner { border: 1px solid #000; background: #fff; }
  .site-header { background: #fff; color: #000; border-bottom: 2px solid #000; box-shadow: none; }
  .brand, .brand small { color: #000; }
  .brand img { box-shadow: none; }
  .hero { background: #fff; color: #000; box-shadow: none; padding: 0; margin: 0 0 10px; }
  .hero::after { display: none; }
  .hero h1, .hero p, .hero strong, .hero a { color: #000; }
  .admin-nav, .nav-toggle, .no-print, .site-footer, .header-link, .btn, form button { display: none !important; }
  .card, .kpi, .table-wrap { border: 0; padding: 0; margin-bottom: 14px; break-inside: avoid; box-shadow: none; }
  .grid2 { grid-template-columns: 1fr 1fr; }
  a { color: #000; text-decoration: none; }
}
