/* ==========================================================================
   Strasodonte — direction artistique
   Fonds lilas doux, cartes blanc cassé, accents violets, texte violet-anthracite.
   Contrastes (WCAG) : texte #1E1933 >= 13:1 sur tous les fonds ; blanc sur #6D4AFF 5,15:1 ;
   les textes d'accent utilisent #5B38EB (>= 5:1 sur toutes les surfaces).
   ========================================================================== */

:root {
  --bg: #F7F5FF;
  --surface: #FCFBFD;
  --surface-2: #EFEAFF;
  --surface-3: #E5DEFA;
  --accent: #6D4AFF;
  --accent-hover: #5B38EB;
  --accent-text: #5B38EB;
  --text: #1E1933;
  --muted: #5A5275;
  --border: #E5DEFA;
  --border-strong: #8A7FB0;
  --danger: #9F1D16;
  --danger-bg: #FCEBEA;
  --success: #1D7046;
  --success-bg: #E7F5EC;
  --warning: #6B4A00;
  --warning-bg: #FFF3D6;
  --warning-border: #E0B54D;
  --white: #FFFFFF;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --dur-fast: 180ms;
  --dur: 210ms;
  --dur-slow: 240ms;

  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(30, 25, 51, .05), 0 8px 24px rgba(30, 25, 51, .06);
  --tabbar-h: 0px;
  --font: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  accent-color: var(--accent);
  padding-bottom: var(--tabbar-h);
}
h1, h2, h3, h4 { line-height: 1.25; color: var(--text); }
h1 { font-size: clamp(1.45rem, 1.2rem + 1vw, 1.9rem); margin: 0 0 1rem; }
h2 { font-size: 1.2rem; margin: 1.75rem 0 .75rem; }
h3 { font-size: 1.05rem; }
p { margin: .5rem 0; }
a { color: var(--accent-text); text-underline-offset: 2px; transition: color var(--dur-fast) var(--ease); }
a:hover { color: var(--accent-hover); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
::selection { background: var(--surface-3); }

.skip-link { position: absolute; left: 1rem; top: -3rem; z-index: 20; padding: .5rem 1rem; background: var(--accent);
  color: var(--white); border-radius: var(--radius-sm); transition: top var(--dur) var(--ease); }
.skip-link:focus { top: 1rem; color: var(--white); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* --------------------------------------------------------------------------
   Décor : « dents qui se baladent » + micro-pointillés (très faible opacité)
   -------------------------------------------------------------------------- */
.decor {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  color: var(--accent);
}
.decor::before {
  /* micro-pointillés cantonnés aux marges : jamais derrière la colonne de texte */
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, currentColor 1px, transparent 1.4px);
  background-size: 26px 26px;
  opacity: .05;
  -webkit-mask-image: linear-gradient(90deg, #000 0, #000 9%, transparent 20%, transparent 80%, #000 91%, #000 100%);
  mask-image: linear-gradient(90deg, #000 0, #000 9%, transparent 20%, transparent 80%, #000 91%, #000 100%);
}
.decor-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.decor-item {
  position: absolute;
  width: var(--size, 56px);
  height: var(--size, 56px);
  opacity: .06;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  animation: decor-drift-a 70s ease-in-out infinite alternate;
  will-change: transform;
}
.decor-item--1 { --size: 64px; top: 9%;  left: 2.5%; opacity: .07; animation-duration: 74s; }
.decor-item--2 { --size: 44px; top: 34%; left: 5%;   opacity: .05; animation-name: decor-drift-b; animation-duration: 92s; }
.decor-item--3 { --size: 58px; top: 63%; left: 1.5%; opacity: .06; animation-duration: 86s; animation-delay: -20s; }
.decor-item--4 { --size: 38px; top: 86%; left: 7%;   opacity: .04; animation-name: decor-drift-b; animation-duration: 64s; }
.decor-item--5 { --size: 60px; top: 7%;  right: 3%;  opacity: .06; animation-name: decor-drift-b; animation-duration: 80s; }
.decor-item--6 { --size: 46px; top: 29%; right: 6.5%; opacity: .08; animation-duration: 98s; animation-delay: -35s; }
.decor-item--7 { --size: 54px; top: 55%; right: 2%;  opacity: .05; animation-name: decor-drift-b; animation-duration: 76s; animation-delay: -10s; }
.decor-item--8 { --size: 40px; top: 80%; right: 5.5%; opacity: .06; animation-duration: 68s; }
.decor-item--9 { --size: 34px; top: 47%; left: 9%;   opacity: .04; animation-name: decor-drift-b; animation-duration: 110s; }
.decor-item--10 { --size: 34px; top: 92%; right: 12%; opacity: .05; animation-duration: 90s; animation-delay: -45s; }

@keyframes decor-drift-a {
  0%   { transform: translate3d(0, 0, 0) rotate(-6deg); }
  50%  { transform: translate3d(14px, -22px, 0) rotate(4deg); }
  100% { transform: translate3d(-10px, 18px, 0) rotate(-2deg); }
}
@keyframes decor-drift-b {
  0%   { transform: translate3d(0, 0, 0) rotate(5deg); }
  50%  { transform: translate3d(-16px, 16px, 0) rotate(-5deg); }
  100% { transform: translate3d(12px, -14px, 0) rotate(3deg); }
}

/* Le contenu passe toujours devant le décor, sur des surfaces opaques. */
.topbar, main, .footer { position: relative; z-index: 1; }

/* --------------------------------------------------------------------------
   En-tête & navigation (pouce-friendly sur mobile : barre d'onglets en bas)
   -------------------------------------------------------------------------- */
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  max-width: 76rem; margin: 0 auto; padding: 1rem 1.25rem;
}
.brand { display: inline-flex; align-items: center; gap: .55rem; font-weight: 700; font-size: 1.15rem;
  letter-spacing: .01em; color: var(--text); text-decoration: none; }
/* Logo : coins arrondis, liseré lilas discret (thème). */
.brand-logo { flex: none; width: 40px; height: 40px; border-radius: 12px; object-fit: cover;
  background: var(--surface); box-shadow: 0 0 0 1px var(--border), 0 2px 8px rgba(109, 74, 255, .14); }
.topbar-links { display: flex; gap: .5rem; flex-wrap: wrap; }

.nav { display: flex; gap: .25rem; padding: .3rem; background: var(--surface); border: 1px solid var(--border);
  border-radius: 999px; box-shadow: var(--shadow); }
.nav a { display: inline-flex; align-items: center; gap: .45rem; min-height: 44px; padding: .45rem .95rem;
  border-radius: 999px; color: var(--text); text-decoration: none; font-weight: 600; font-size: .95rem;
  transition: background-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease); }
.nav a:hover { background: var(--surface-2); color: var(--text); }
.nav a[aria-current="page"] { background: var(--accent); color: var(--white); }
.nav-icon { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round;
  stroke-linejoin: round; flex: none; }

/* --------------------------------------------------------------------------
   Mise en page & surfaces
   -------------------------------------------------------------------------- */
main { display: block; }
.container {
  max-width: 34rem; margin: 0 auto 2rem; padding: clamp(1.25rem, 1rem + 1.5vw, 2rem);
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow);
}
.container.wide { max-width: 76rem; background: transparent; border: 0; box-shadow: none; padding-top: .25rem; }
.wide > .page-head, .wide > section, .wide > form, .wide > .panel { margin-left: auto; margin-right: auto; }
.page-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem; }
.page-head h1 { margin: 0; }
section { margin-top: 1.5rem; }
.surface, .panel, .q-card, .gap, details.ue, .table-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow);
}
.panel { padding: clamp(1rem, .8rem + 1vw, 1.5rem); margin-top: 1rem; }
.muted { color: var(--muted); font-size: .92rem; }
.lead { color: var(--muted); max-width: 62ch; }

/* --------------------------------------------------------------------------
   Formulaires
   -------------------------------------------------------------------------- */
label { display: block; margin-top: 1rem; font-weight: 600; }
input, select, textarea { font: inherit; color: var(--text); }
input[type="email"], input[type="password"], input[type="number"], input[type="datetime-local"],
input[type="text"], input:not([type]), select, textarea {
  width: 100%; min-height: 46px; margin-top: .3rem; padding: .6rem .8rem; font-size: 1rem;
  background: var(--white); border: 1.5px solid var(--border-strong); border-radius: var(--radius-sm);
  transition: border-color var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
}
textarea { min-height: 7.5rem; resize: vertical; line-height: 1.55; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--surface-3); }
input[type="checkbox"], input[type="radio"] { width: 1.15rem; height: 1.15rem; margin: .2rem 0 0; flex: none; }
fieldset { margin: 0; padding: .75rem 1rem 1rem; border: 1px solid var(--border); border-radius: var(--radius-sm); }
legend { padding: 0 .35rem; font-weight: 700; }
.checkbox { display: flex; gap: .7rem; align-items: flex-start; margin-top: 1.25rem; padding: .85rem 1rem;
  background: var(--surface-2); border-radius: var(--radius-sm); }
.checkbox label { margin: 0; font-weight: 400; font-size: .94rem; }
.radio { display: flex; gap: .6rem; align-items: center; font-weight: 400; margin-top: .5rem; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: .25rem 1rem; }

/* --------------------------------------------------------------------------
   Boutons
   -------------------------------------------------------------------------- */
button, .btn-primary, .btn-secondary, .btn-ghost {
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
  min-height: 46px; padding: .6rem 1.2rem; margin-top: 1rem;
  font: inherit; font-weight: 600; line-height: 1.2; text-decoration: none; cursor: pointer;
  border: 1.5px solid transparent; border-radius: 999px;
  transition: background-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease),
              border-color var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease),
              box-shadow var(--dur-fast) var(--ease);
}
.btn-primary { background: var(--accent); color: var(--white); box-shadow: 0 4px 14px rgba(109, 74, 255, .25); }
.btn-primary:hover { background: var(--accent-hover); color: var(--white); }
.btn-secondary { background: var(--surface); color: var(--accent-text); border-color: var(--surface-3); }
.btn-secondary:hover { background: var(--surface-2); color: var(--accent-hover); border-color: var(--accent); }
.btn-ghost { background: transparent; color: var(--accent-text); }
.btn-ghost:hover { background: var(--surface-2); }
button:active, .btn-primary:active, .btn-secondary:active { transform: translateY(1px); }
button:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; margin-top: 1rem; }
.actions > button, .actions > a { margin-top: 0; }
.chip { min-height: 40px; padding: .4rem .95rem; margin-top: 0; font-size: .92rem; }
.chip[aria-pressed="true"] { background: var(--accent); color: var(--white); border-color: var(--accent); }

/* --------------------------------------------------------------------------
   Messages
   -------------------------------------------------------------------------- */
.warning, .error, .success, .info { border-radius: var(--radius-sm); }
.warning { padding: .85rem 1rem; color: var(--warning); background: var(--warning-bg); border-left: 4px solid var(--warning-border); }
.warning strong { color: var(--warning); }
.error { color: var(--danger); font-weight: 600; }
.error:not(:empty):not([hidden]).boxed, .alert-error { padding: .7rem 1rem; background: var(--danger-bg); }
.success { color: var(--success); font-weight: 600; }
.info { padding: .7rem 1rem; background: var(--surface-2); }

/* --------------------------------------------------------------------------
   Modale CGU (ouverture / fermeture animées)
   -------------------------------------------------------------------------- */
.modal {
  width: min(48rem, 94vw); max-height: 90vh; padding: 0; color: var(--text);
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: 0 24px 60px rgba(30, 25, 51, .22);
}
.modal[open] { display: flex; flex-direction: column; animation: modal-in var(--dur-slow) var(--ease); }
.modal[open]::backdrop { background: rgba(30, 25, 51, .45); animation: backdrop-in var(--dur-slow) var(--ease); }
.modal.is-closing { animation: modal-out var(--dur) var(--ease) forwards; }
.modal.is-closing::backdrop { animation: backdrop-out var(--dur) var(--ease) forwards; }
@keyframes modal-in { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes modal-out { from { opacity: 1; transform: none; } to { opacity: 0; transform: translateY(10px) scale(.985); } }
@keyframes backdrop-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes backdrop-out { from { opacity: 1; } to { opacity: 0; } }
.modal-header, .modal-footer { padding: 1rem 1.35rem; }
.modal-header { border-bottom: 1px solid var(--border); background: var(--surface-2); border-radius: var(--radius) var(--radius) 0 0; }
.modal-header h2 { margin: 0; font-size: 1.2rem; }
.modal-body { flex: 1 1 auto; padding: 1.1rem 1.35rem; overflow-y: auto; overscroll-behavior: contain; font-size: .95rem; max-width: 72ch; }
.modal-footer { border-top: 1px solid var(--border); background: var(--surface); border-radius: 0 0 var(--radius) var(--radius); }
.cgu-title { font-size: 1.08rem; margin-top: 0; }
.cgu-section { margin: 1.25rem 0 .35rem; font-size: 1rem; color: var(--accent-text); }

/* Page CGU autonome */
.cgu-doc { max-width: 72ch; }
.cgu-doc .cgu-section { font-size: 1.05rem; }

/* --------------------------------------------------------------------------
   Tableau de bord
   -------------------------------------------------------------------------- */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(10.5rem, 1fr)); gap: .85rem; }
.card { padding: 1rem 1.1rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-label { display: block; font-size: .82rem; color: var(--muted); font-weight: 600; }
.card strong { display: block; margin-top: .2rem; font-size: 1.5rem; }
.card.accent { background: var(--accent); border-color: var(--accent); }
.card.accent .card-label, .card.accent strong { color: var(--white); }
.gaps { list-style: none; padding: 0; margin: 0; display: grid; gap: .85rem; }
.gap { padding: 1rem 1.15rem; }
.gap-head { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .75rem; }
.gap-head strong { font-size: 1.05rem; }
.badge { display: inline-block; padding: .15rem .6rem; border-radius: 999px; font-size: .78rem; font-weight: 700;
  background: var(--surface-2); color: var(--accent-text); }
.badge-weak { background: var(--danger-bg); color: var(--danger); }
.badge-new { background: var(--surface-2); color: var(--accent-text); }
.badge-due { background: var(--warning-bg); color: var(--warning); }
.badge-consolidation { background: var(--success-bg); color: var(--success); }
.badge-bank { background: var(--accent-hover); color: #fff; }
.group-head { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .75rem; margin: .9rem 0 .5rem; }
.group-head .muted { font-weight: 400; }
.excerpt { font-size: .92rem; color: var(--muted); white-space: pre-line; max-width: 72ch; }

/* Jauges de maîtrise (largeur animée) */
.bar { display: inline-block; width: 7rem; height: .6rem; background: var(--surface-3); border-radius: 999px;
  overflow: hidden; vertical-align: middle; }
.bar.lg { width: 100%; height: .7rem; }
.bar-fill { display: block; width: 0; height: 100%; background: var(--accent); border-radius: inherit;
  transition: width var(--dur-slow) var(--ease); }
.bar-fill.low { background: repeating-linear-gradient(45deg, var(--accent) 0 6px, var(--accent-hover) 6px 12px); }
details.ue { margin-bottom: .85rem; padding: .35rem 1rem; }
details summary { cursor: pointer; padding: .65rem 0; list-style-position: inside; }
details.ue summary { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .8rem; }

/* Tableaux */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
details.ue .table-wrap { border: 0; }
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th, td { text-align: left; padding: .6rem .75rem; border-bottom: 1px solid var(--border); vertical-align: top; }
th { font-size: .82rem; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); background: var(--surface-2); }
tbody tr { transition: background-color var(--dur-fast) var(--ease); }
tbody tr:hover { background: var(--bg); }
tr.flagged { background: var(--warning-bg); }

/* --------------------------------------------------------------------------
   Zone d'entraînement : QCM / QRC / correction
   -------------------------------------------------------------------------- */
.player-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem; color: var(--muted); font-weight: 600; }
.timer { padding: .3rem .8rem; border-radius: 999px; background: var(--danger-bg); color: var(--danger); font-variant-numeric: tabular-nums; }
.session-progress { margin: .5rem 0 1rem; }
.q-card { padding: clamp(1.1rem, .9rem + 1.2vw, 1.75rem); }
.q-enter { animation: q-enter var(--dur-slow) var(--ease); }
@keyframes q-enter { from { opacity: 0; transform: translateX(18px); } to { opacity: 1; transform: none; } }
.q-meta { color: var(--muted); font-size: .88rem; }
.stem { font-size: clamp(1.08rem, 1rem + .4vw, 1.28rem); line-height: 1.5; max-width: 70ch; margin: .4rem 0 1rem; }
.option {
  display: flex; align-items: flex-start; gap: .75rem; min-height: 52px; margin: .55rem 0; padding: .8rem 1rem;
  font-weight: 400; background: var(--surface); border: 1.5px solid var(--surface-3); border-radius: var(--radius-sm);
  cursor: pointer;
  transition: border-color var(--dur-fast) var(--ease), background-color var(--dur-fast) var(--ease),
              box-shadow var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease);
}
.option:hover { border-color: var(--border-strong); background: var(--bg); }
.option.is-selected, .option:has(input:checked) { border-color: var(--accent); background: var(--surface-2); box-shadow: 0 0 0 3px rgba(109, 74, 255, .14); }
.option-label { font-weight: 700; color: var(--accent-text); min-width: 1.4rem; }
.answer textarea { min-height: 9.5rem; }
.correction { margin-top: 1rem; }
.reveal { animation: reveal var(--dur-slow) var(--ease); }
@keyframes reveal { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.verdict { padding: .7rem 1rem; border-radius: var(--radius-sm); }
.verdict.success { background: var(--success-bg); }
.verdict.error { background: var(--danger-bg); }
.item-correction { margin: .55rem 0; padding: .75rem 1rem; border-radius: var(--radius-sm); border-left: 4px solid; }
.item-correction.is-true { border-color: var(--success); background: var(--success-bg); }
.item-correction.is-false { border-color: var(--danger); background: var(--danger-bg); }
.item-correction.picked { box-shadow: inset 0 0 0 2px var(--accent); }
.item-correction p { margin: .35rem 0 0; color: var(--text); }
.explanation { padding: .8rem 1rem; background: var(--surface-2); border-radius: var(--radius-sm); max-width: 72ch; }
.self { margin-top: 1rem; padding-top: .75rem; border-top: 1px dashed var(--surface-3); }

/* --------------------------------------------------------------------------
   Administration
   -------------------------------------------------------------------------- */
.tabs { display: flex; flex-wrap: wrap; gap: .4rem; padding: .3rem; background: var(--surface); border: 1px solid var(--border);
  border-radius: 999px; width: fit-content; max-width: 100%; }
.tabs button { margin: 0; min-height: 42px; background: transparent; color: var(--text); }
.tabs button:hover { background: var(--surface-2); }
.tabs button[aria-selected="true"] { background: var(--accent); color: var(--white); }
/* Page d'authentification : grand logo centré au-dessus des onglets (96 à 120 px). */
.auth-hero { display: flex; justify-content: center; margin: .25rem 0 1.1rem; }
.auth-logo { display: block; width: clamp(96px, 24vw, 120px); height: auto; aspect-ratio: 1 / 1;
  border-radius: 28px; object-fit: cover; background: var(--surface);
  box-shadow: 0 0 0 1px var(--border), 0 10px 28px rgba(109, 74, 255, .18); }
/* Onglets de la page d'authentification (liens : utilisables sans JavaScript). */
.auth-tabs { margin: 0 auto 1.25rem; }
.tabs a[role="tab"] { display: inline-flex; align-items: center; min-height: 42px; padding: .5rem 1.1rem;
  border-radius: 999px; font-weight: 600; color: var(--text); text-decoration: none;
  transition: background-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease); }
.tabs a[role="tab"]:hover { background: var(--surface-2); }
.tabs a[role="tab"][aria-selected="true"] { background: var(--accent); color: var(--white); }
.item-edit { margin: .6rem 0; background: var(--bg); }
.item-edit textarea { min-height: 3.2rem; }
.status-form { display: grid; gap: .4rem; min-width: 15rem; }
.status-form input, .status-form select, .status-form button { margin-top: 0; }
.reject { display: inline-flex; flex-wrap: wrap; gap: .5rem; align-items: center; flex: 1 1 22rem; }
.reject input { margin-top: 0; min-width: 12rem; flex: 1 1 12rem; width: auto; }
.reject button { margin-top: 0; }
.account dt { font-weight: 700; margin-top: .5rem; }
.account dd { margin: 0; }

/* --------------------------------------------------------------------------
   Pied de page (mention obligatoire)
   -------------------------------------------------------------------------- */
.footer { max-width: 76rem; margin: 0 auto; padding: 1.25rem 1.25rem 2rem; text-align: center; font-size: .88rem; color: var(--muted); }
.footer a { font-weight: 600; }
.footer .copyright { display: block; margin-top: .35rem; font-weight: 600; color: var(--text); }

/* --------------------------------------------------------------------------
   Mobile : navigation au pouce, cartes empilées, saisie QRC confortable
   -------------------------------------------------------------------------- */
@media (max-width: 47.99rem) {
  body.has-tabbar { --tabbar-h: calc(68px + env(safe-area-inset-bottom, 0px)); }
  .topbar { padding: .85rem 1rem; }
  .has-tabbar .nav {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; justify-content: space-around;
    padding: .35rem .5rem calc(.35rem + env(safe-area-inset-bottom, 0px)); border-radius: 0;
    border-width: 1px 0 0; box-shadow: 0 -6px 20px rgba(30, 25, 51, .08);
  }
  .has-tabbar .nav a { flex: 1 1 0; flex-direction: column; gap: .15rem; min-height: 54px; padding: .35rem .25rem;
    font-size: .72rem; border-radius: var(--radius-sm); text-align: center; }
  .container { margin: 0 .6rem 1.25rem; }
  .container.wide { margin: 0 auto 1rem; padding: .25rem .85rem 1rem; }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .actions > a, .actions > button { flex: 1 1 auto; }
  .modal { width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; border-radius: 0; margin: 0; }
  .modal-header, .modal-footer { border-radius: 0; }
  .modal-footer .actions { position: sticky; bottom: 0; }
  .answer textarea { min-height: 12rem; }
  .bar { width: 5.5rem; }
  .tabs { border-radius: var(--radius); }
  .brand-logo { width: 34px; height: 34px; border-radius: 10px; }
  .auth-logo { width: 96px; border-radius: 24px; }
  .decor-item--2, .decor-item--4, .decor-item--6, .decor-item--9 { display: none; }
  .decor-item { --size: 36px; }
}

/* --------------------------------------------------------------------------
   Mouvement réduit : décor figé, animations et transitions neutralisées
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .decor-item { animation: none !important; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}

/* --------------------------------------------------------------------------
   Impression / export PDF : la mention figure en pied de chaque page
   -------------------------------------------------------------------------- */
@media print {
  .decor, .nav, .topbar-links, .skip-link, .actions, .tabs, button, .no-print { display: none !important; }
  body { background: #fff; padding: 0; }
  .container, .container.wide, .panel, .card, .gap, .q-card, details.ue, .table-wrap { box-shadow: none; border-color: #ccc; }
  .footer { position: fixed; bottom: 0; left: 0; right: 0; padding: .3rem; background: #fff; }
  main { padding-bottom: 3rem; }
  details > *:not(summary) { display: block !important; }
}
