/* =========================================================================
   Plateforme de Gestion des Présences - Rencontre Avec le Président de la République
   Charte : vert (#0b3d2e) · or (#c9a227) · bleu (#1b3a7a) - mobile first
   ========================================================================= */

:root {
  --vert: #0b3d2e;
  --vert-clair: #0f5a41;
  --vert-pale: #eef5f1;
  --or: #c9a227;
  --or-clair: #e3c56b;
  --bleu: #1b3a7a;
  --rouge: #b3261e;
  --rouge-pale: #fdeceb;
  --orange: #b26a00;
  --orange-pale: #fdf3e3;
  --vert-succes: #1c7a4f;
  --vert-succes-pale: #e7f5ee;

  --encre: #16211d;
  --encre-douce: #56645e;
  --ligne: #dfe6e2;
  --fond: #f5f7f6;
  --surface: #ffffff;

  --rayon: 14px;
  --rayon-sm: 9px;
  --ombre: 0 1px 2px rgba(11, 61, 46, .06), 0 6px 20px rgba(11, 61, 46, .07);
  --ombre-forte: 0 10px 40px rgba(11, 61, 46, .16);
  --serif: Georgia, "Times New Roman", serif;
  --sans: "Segoe UI", Roboto, -apple-system, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  color: var(--encre);
  background: var(--fond);
}

img, svg { max-width: 100%; }
a { color: var(--vert-clair); }
a:hover { color: var(--vert); }

h1, h2, h3, h4 { font-family: var(--serif); line-height: 1.25; margin: 0 0 .5em; }
h1 { font-size: 1.6rem; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.05rem; }

.wrap { width: min(1180px, 100% - 2rem); margin-inline: auto; }
.wrap-etroit { width: min(680px, 100% - 2rem); margin-inline: auto; }
.mt-1 { margin-top: .5rem; } .mt-2 { margin-top: 1rem; } .mt-3 { margin-top: 1.75rem; }
.mb-2 { margin-bottom: 1rem; } .mb-3 { margin-bottom: 1.75rem; }
.center { text-align: center; }
.muted { color: var(--encre-douce); }
.small { font-size: .84rem; }
.mono { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; }
.nowrap { white-space: nowrap; }

/* ---------------------------------------------------------------- En-tête */
.entete {
  background: linear-gradient(160deg, #0b3d2e 0%, #072a1f 100%);
  color: #eaf3ee;
  border-bottom: 3px solid var(--or);
}
.entete-inner {
  display: flex; align-items: center; gap: .9rem;
  padding: .7rem 0; flex-wrap: wrap;
}
/* Armoiries de la République Gabonaise présentées en médaillon */
.entete .sceau {
  width: 56px; height: 56px; flex: none; object-fit: contain;
  background: #fff; border-radius: 50%; padding: 4px;
  border: 2px solid var(--or); box-shadow: 0 2px 8px rgba(0, 0, 0, .3);
}
.entete-marque {
  display: flex; align-items: center; gap: .9rem; flex: 1 1 auto; min-width: 0;
  text-decoration: none; border-radius: 10px; padding: .2rem .4rem .2rem .2rem;
  transition: background .15s ease;
}
.entete-marque:hover { background: rgba(255, 255, 255, .07); }
.entete-titres { display: block; flex: 1 1 auto; min-width: 0; }
.entete-pays {
  display: block; font-family: var(--serif); font-size: .95rem;
  letter-spacing: .07em; text-transform: uppercase; color: #fff; margin: 0;
}
.entete-devise { display: block; font-size: .72rem; color: var(--or-clair); letter-spacing: .13em; text-transform: uppercase; }
.entete-event { display: block; font-size: .82rem; color: #b9d2c6; }

.nav { display: flex; gap: .25rem; flex-wrap: wrap; padding-bottom: .5rem; }
.nav a {
  color: #cfe2d8; text-decoration: none; font-size: .87rem; font-weight: 600;
  padding: .45rem .8rem; border-radius: 999px; white-space: nowrap;
}
.nav a:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.nav a.actif { background: var(--or); color: #2a2000; }

/* --------------------------------------------------------------- Contenu */
main { padding: 1.5rem 0 3.5rem; }
.page-titre { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.page-titre h1 { margin: 0; }
.page-titre .sous { color: var(--encre-douce); font-size: .9rem; }

.carte {
  background: var(--surface); border: 1px solid var(--ligne);
  border-radius: var(--rayon); box-shadow: var(--ombre); padding: 1.25rem;
}
.carte + .carte { margin-top: 1rem; }
.carte-titre {
  display: flex; align-items: center; justify-content: space-between; gap: .75rem;
  margin: -.25rem 0 1rem; padding-bottom: .7rem; border-bottom: 1px solid var(--ligne);
  flex-wrap: wrap;
}
.carte-titre h2, .carte-titre h3 { margin: 0; }

.grille { display: grid; gap: 1rem; }
.grille-2 { grid-template-columns: 1fr; }
.grille-3 { grid-template-columns: 1fr; }
.grille-4 { grid-template-columns: repeat(2, 1fr); }
@media (min-width: 720px) {
  .grille-2 { grid-template-columns: repeat(2, 1fr); }
  .grille-3 { grid-template-columns: repeat(3, 1fr); }
  .grille-4 { grid-template-columns: repeat(4, 1fr); }
}
.col-2 { grid-column: span 2; }

/* --------------------------------------------------------------- Tuiles */
.tuile {
  background: var(--surface); border: 1px solid var(--ligne);
  border-radius: var(--rayon); padding: 1rem 1.1rem; box-shadow: var(--ombre);
  border-left: 4px solid var(--vert);
}
.tuile .val { font-family: var(--serif); font-size: 2rem; font-weight: 700; color: var(--vert); line-height: 1.1; }
.tuile .lib { font-size: .78rem; text-transform: uppercase; letter-spacing: .07em; color: var(--encre-douce); font-weight: 600; }
.tuile .note { font-size: .8rem; color: var(--encre-douce); margin-top: .3rem; }
.tuile.or { border-left-color: var(--or); } .tuile.or .val { color: #8a6d10; }
.tuile.bleu { border-left-color: var(--bleu); } .tuile.bleu .val { color: var(--bleu); }
.tuile.rouge { border-left-color: var(--rouge); } .tuile.rouge .val { color: var(--rouge); }

/* -------------------------------------------------------------- Boutons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font: inherit; font-weight: 600; font-size: .93rem;
  padding: .68rem 1.15rem; border-radius: var(--rayon-sm);
  border: 1px solid transparent; cursor: pointer; text-decoration: none;
  transition: transform .06s ease, box-shadow .15s ease, background .15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-principal { background: var(--vert); color: #fff; box-shadow: 0 2px 10px rgba(11,61,46,.25); }
.btn-principal:hover { background: var(--vert-clair); color: #fff; }
.btn-or { background: var(--or); color: #2a2000; }
.btn-or:hover { background: var(--or-clair); color: #2a2000; }
.btn-secondaire { background: #fff; color: var(--vert); border-color: var(--ligne); }
.btn-secondaire:hover { background: var(--vert-pale); color: var(--vert); }
.btn-danger { background: var(--rouge); color: #fff; }
.btn-danger:hover { background: #8f1d17; color: #fff; }
.btn-bloc { display: flex; width: 100%; }
.btn-sm { padding: .4rem .7rem; font-size: .82rem; }
.btn[disabled], .btn:disabled { opacity: .55; cursor: not-allowed; }
.actions { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; }

/* ----------------------------------------------------------- Formulaires */
.champ { margin-bottom: 1.05rem; }
.champ > label, .champ-legende {
  display: block; font-weight: 600; font-size: .87rem;
  margin-bottom: .35rem; color: #24332c;
}
.field-input, input[type=text], input[type=email], input[type=tel], input[type=date],
input[type=password], input[type=number], select, textarea {
  width: 100%; font: inherit; color: var(--encre);
  padding: .7rem .85rem; border: 1px solid #c8d3cd; border-radius: var(--rayon-sm);
  background: #fff; transition: border-color .15s, box-shadow .15s;
}
.field-input:focus, input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--vert-clair);
  box-shadow: 0 0 0 3px rgba(15, 90, 65, .14);
}
.aide { font-size: .8rem; color: var(--encre-douce); margin-top: .3rem; }
.erreur, .errorlist {
  color: var(--rouge); font-size: .84rem; margin: .35rem 0 0;
  list-style: none; padding: 0;
}
.champ.en-erreur .field-input { border-color: var(--rouge); }

.radios { display: flex; gap: .5rem; flex-wrap: wrap; }
.radios ul { list-style: none; margin: 0; padding: 0; display: flex; gap: .5rem; flex-wrap: wrap; }
.radios label {
  display: inline-flex; align-items: center; gap: .45rem; cursor: pointer;
  border: 1px solid #c8d3cd; background: #fff; border-radius: 999px;
  padding: .5rem .9rem; font-size: .9rem; font-weight: 500;
}
.radios input { accent-color: var(--vert); }
.radios label:has(input:checked) { border-color: var(--vert); background: var(--vert-pale); font-weight: 600; }

.case { display: flex; gap: .6rem; align-items: flex-start; font-size: .88rem; line-height: 1.45; }
.case input { margin-top: .25rem; accent-color: var(--vert); width: 1.1rem; height: 1.1rem; flex: none; }

.otp-input {
  font-size: 2rem; letter-spacing: .6em; text-align: center;
  font-family: ui-monospace, monospace; padding-left: .6em;
}

.filtres { display: flex; gap: .6rem; flex-wrap: wrap; align-items: flex-end; }
.filtres .champ { margin-bottom: 0; flex: 1 1 170px; }

/* -------------------------------------------------------------- Bandeaux */
.msg {
  display: flex; gap: .7rem; align-items: flex-start;
  border-radius: var(--rayon-sm); padding: .8rem 1rem; margin-bottom: .8rem;
  font-size: .92rem; border: 1px solid;
}
.msg-success { background: var(--vert-succes-pale); border-color: #b7e0cb; color: #10543a; }
.msg-error, .msg-danger { background: var(--rouge-pale); border-color: #f3c6c3; color: #8f1d17; }
.msg-warning { background: var(--orange-pale); border-color: #f0d9ab; color: #7a4a00; }
.msg-info { background: #eaf1fb; border-color: #c5d6f0; color: #1b3a7a; }

.encart {
  background: var(--vert-pale); border: 1px solid #cde0d6; border-left: 4px solid var(--vert);
  border-radius: var(--rayon-sm); padding: .9rem 1rem; font-size: .9rem;
}
.encart-or { background: #fdf7e6; border-color: #eddfb0; border-left-color: var(--or); }

/* --------------------------------------------------------------- Badges */
.badge {
  display: inline-flex; align-items: center; gap: .35rem;
  font-size: .74rem; font-weight: 700; letter-spacing: .03em; text-transform: uppercase;
  padding: .25rem .6rem; border-radius: 999px; border: 1px solid;
  background: #eef1f0; border-color: #dbe2df; color: #45524c; white-space: nowrap;
}
.badge-present, .badge-valide { background: var(--vert-succes-pale); border-color: #b7e0cb; color: #10543a; }
.badge-enregistre { background: #eaf1fb; border-color: #c5d6f0; color: var(--bleu); }
.badge-attente, .badge-brouillon { background: var(--orange-pale); border-color: #f0d9ab; color: #7a4a00; }
.badge-rejete, .badge-alerte { background: var(--rouge-pale); border-color: #f3c6c3; color: #8f1d17; }
.badge-or { background: #fdf7e6; border-color: #eddfb0; color: #7a5c07; }

/* -------------------------------------------------------------- Tableaux */
.table-wrap { overflow-x: auto; border-radius: var(--rayon-sm); border: 1px solid var(--ligne); background: #fff; }
table.donnees { width: 100%; border-collapse: collapse; font-size: .88rem; min-width: 620px; }
table.donnees th {
  background: var(--vert); color: #fff; text-align: left; font-weight: 600;
  padding: .65rem .8rem; font-size: .78rem; text-transform: uppercase; letter-spacing: .04em;
  position: sticky; top: 0; white-space: nowrap;
}
table.donnees td { padding: .6rem .8rem; border-top: 1px solid var(--ligne); vertical-align: middle; }
table.donnees tbody tr:nth-child(even) { background: #fafcfb; }
table.donnees tbody tr:hover { background: var(--vert-pale); }
table.donnees a { font-weight: 600; text-decoration: none; }
.vide { text-align: center; padding: 2.5rem 1rem; color: var(--encre-douce); }

dl.fiche { display: grid; grid-template-columns: 1fr; gap: .1rem 1rem; margin: 0; }
@media (min-width: 560px) { dl.fiche { grid-template-columns: max-content 1fr; } }
dl.fiche dt { font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--encre-douce); font-weight: 600; padding-top: .55rem; }
dl.fiche dd { margin: 0; padding-top: .55rem; font-weight: 500; }

/* ------------------------------------------------------------ Pagination */
.pagination { display: flex; gap: .35rem; justify-content: center; align-items: center; margin-top: 1.25rem; flex-wrap: wrap; }
.pagination a, .pagination span {
  padding: .45rem .8rem; border-radius: var(--rayon-sm); border: 1px solid var(--ligne);
  background: #fff; text-decoration: none; font-size: .87rem; color: var(--vert);
}
.pagination .courant { background: var(--vert); color: #fff; border-color: var(--vert); font-weight: 700; }

/* ----------------------------------------------------------------- Barre */
.barre { height: 9px; background: #e6ecea; border-radius: 999px; overflow: hidden; }
.barre > span { display: block; height: 100%; background: linear-gradient(90deg, var(--vert-clair), var(--or)); border-radius: 999px; }
.ligne-stat { display: flex; align-items: center; gap: .75rem; padding: .45rem 0; font-size: .88rem; }
.ligne-stat .lib { flex: 0 0 40%; color: #33423b; }
.ligne-stat .barre { flex: 1; }
.ligne-stat .n { flex: none; font-weight: 700; color: var(--vert); min-width: 3.2rem; text-align: right; }

/* ------------------------------------------------------------ Étapes */
.etapes { display: flex; gap: .4rem; margin-bottom: 1.5rem; }
.etape { flex: 1; text-align: center; font-size: .74rem; color: var(--encre-douce); }
.etape .puce {
  width: 30px; height: 30px; margin: 0 auto .35rem; border-radius: 50%;
  display: grid; place-items: center; font-weight: 700; font-size: .85rem;
  background: #e6ecea; color: var(--encre-douce); border: 2px solid #e6ecea;
}
.etape.active .puce { background: var(--vert); color: #fff; border-color: var(--vert); }
.etape.faite .puce { background: var(--or); color: #2a2000; border-color: var(--or); }
.etape.active, .etape.faite { color: var(--vert); font-weight: 600; }

/* ------------------------------------------------------------- Accueil */
.hero {
  background: linear-gradient(165deg, #0b3d2e 0%, #062a1f 65%, #041e16 100%);
  color: #eaf3ee; padding: 2.5rem 0 3rem; text-align: center;
  border-bottom: 3px solid var(--or);
}
.hero .sceau-hero {
  width: 132px; height: 132px; margin-bottom: 1rem; object-fit: contain;
  background: #fff; border-radius: 50%; padding: 10px;
  border: 3px solid var(--or); box-shadow: 0 6px 22px rgba(0, 0, 0, .45);
}
.hero h1 { color: #fff; font-size: clamp(1.5rem, 5vw, 2.3rem); margin-bottom: .35rem; }
.hero .surtitre { color: var(--or-clair); letter-spacing: .18em; text-transform: uppercase; font-size: .78rem; }
.hero p.chapeau { color: #c3d8cd; max-width: 620px; margin: .8rem auto 1.6rem; font-size: 1.02rem; }
.hero .actions { justify-content: center; }

.etape-carte { text-align: center; padding: 1.4rem 1.1rem; }
.etape-carte .num {
  width: 42px; height: 42px; margin: 0 auto .7rem; border-radius: 50%;
  display: grid; place-items: center; background: var(--vert-pale);
  color: var(--vert); font-family: var(--serif); font-size: 1.25rem; font-weight: 700;
  border: 2px solid var(--vert);
}
.etape-carte h3 { margin-bottom: .35rem; }
.etape-carte p { margin: 0; font-size: .9rem; color: var(--encre-douce); }

/* ----------------------------------------------------------- QR Code */
.qr-carte {
  text-align: center; background: #fff; border: 2px solid var(--vert);
  border-radius: var(--rayon); padding: 1.5rem 1.25rem; box-shadow: var(--ombre-forte);
}
.qr-carte img { width: min(280px, 80vw); height: auto; display: block; margin: 0 auto; }
.qr-ref {
  font-family: ui-monospace, monospace; font-size: 1.15rem; font-weight: 700;
  letter-spacing: .12em; color: var(--vert); margin-top: .6rem;
}

/* -------------------------------------------------------------- Scanner */
.scanner-zone {
  position: relative; background: #04150f; border-radius: var(--rayon);
  overflow: hidden; aspect-ratio: 3 / 4; max-height: 62vh; margin-inline: auto;
  display: grid; place-items: center;
}
.scanner-zone video { width: 100%; height: 100%; object-fit: cover; }
.viseur {
  position: absolute; inset: 12% 10%; border: 3px solid rgba(201, 162, 39, .9);
  border-radius: 18px; box-shadow: 0 0 0 100vmax rgba(4, 21, 15, .45);
  pointer-events: none;
}
.viseur::after {
  content: ""; position: absolute; left: 6%; right: 6%; height: 2px;
  background: var(--or-clair); box-shadow: 0 0 12px var(--or);
  animation: balayage 2.4s ease-in-out infinite;
}
@keyframes balayage { 0%, 100% { top: 8%; } 50% { top: 90%; } }
.scanner-vide { color: #8fb3a3; text-align: center; padding: 2rem; font-size: .9rem; }

.resultat { border-radius: var(--rayon); padding: 1.15rem 1.25rem; border: 2px solid; }
.resultat h2 { margin: 0 0 .25rem; font-size: 1.2rem; }
.resultat.ok { background: var(--vert-succes-pale); border-color: var(--vert-succes); color: #0d4a33; }
.resultat.ko { background: var(--rouge-pale); border-color: var(--rouge); color: #7d1a15; }
.resultat.attention { background: var(--orange-pale); border-color: #d99b1c; color: #6d4300; }
.resultat dl.fiche dt { color: inherit; opacity: .75; }
.resultat .grand { font-family: var(--serif); font-size: 1.5rem; font-weight: 700; }

/* ---------------------------------------------------------- Pied de page */
.pied {
  background: #072a1f; color: #9fbfae; padding: 1.6rem 0; font-size: .82rem;
  border-top: 3px solid var(--or); margin-top: auto;
}
.pied a { color: var(--or-clair); }
.pied-inner { display: flex; gap: 1rem; justify-content: space-between; flex-wrap: wrap; align-items: center; }

body { display: flex; flex-direction: column; min-height: 100vh; }
main { flex: 1 0 auto; }

/* =========================================================================
   ADAPTATION MOBILE ET TABLETTE
   ========================================================================= */

/* --- Confort tactile : cibles d'au moins 44 px, pas de zoom involontaire -- */
@media (pointer: coarse) {
  .btn { min-height: 46px; padding-inline: 1.15rem; }
  .btn-sm { min-height: 38px; }
  .nav a { padding: .6rem .9rem; }
  .field-input, input, select, textarea { min-height: 46px; font-size: 16px; }
  .radios label { min-height: 44px; }
  table.donnees a, dl.fiche dd a { padding: .15rem 0; display: inline-block; }
}

/* --- Encoches et barres système (iOS/Android) ---------------------------- */
.entete { padding-top: env(safe-area-inset-top); }
.pied { padding-bottom: calc(1.6rem + env(safe-area-inset-bottom)); }
.wrap, .wrap-etroit {
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}

/* --- Tablette : on densifie les grilles ---------------------------------- */
@media (min-width: 900px) {
  .grille-4 { grid-template-columns: repeat(4, 1fr); }
}
@media (min-width: 720px) and (max-width: 899px) {
  .grille-4 { grid-template-columns: repeat(2, 1fr); }
  .grille-3 { grid-template-columns: repeat(2, 1fr); }
}

/* --- Téléphone ----------------------------------------------------------- */
@media (max-width: 719px) {
  body { font-size: 15.5px; }
  h1 { font-size: 1.35rem; }
  h2 { font-size: 1.1rem; }

  .wrap, .wrap-etroit { width: calc(100% - 1.6rem); }
  main { padding: 1rem 0 2.5rem; }
  .carte { padding: 1rem; border-radius: 12px; }

  .entete-inner { gap: .65rem; padding: .55rem 0; }
  .entete .sceau { width: 44px; height: 44px; }
  .entete-pays { font-size: .82rem; }
  .entete-devise { font-size: .62rem; letter-spacing: .1em; }
  .entete-event { font-size: .74rem; }
  .entete-marque { gap: .6rem; }

  /* Navigation en bandeau défilant horizontalement */
  .nav {
    flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none;
    -webkit-overflow-scrolling: touch; padding-bottom: .55rem;
  }
  .nav::-webkit-scrollbar { display: none; }

  .page-titre { flex-direction: column; align-items: stretch; gap: .6rem; }
  .page-titre .actions .btn { flex: 1 1 auto; }

  /* Les actions principales occupent toute la largeur */
  .actions { gap: .5rem; }
  .actions > .btn, .actions > form, .actions > form > .btn { width: 100%; }
  .actions > .btn-sm { width: auto; }

  .filtres { flex-direction: column; align-items: stretch; }
  .filtres .champ { flex: 1 1 auto; }
  .filtres .btn { width: 100%; }

  .tuile { padding: .8rem .9rem; }
  .tuile .val { font-size: 1.55rem; }
  .tuile .lib { font-size: .68rem; }

  .hero { padding: 1.8rem 0 2.2rem; }
  .hero .sceau-hero { width: 104px; height: 104px; }
  .hero p.chapeau { font-size: .95rem; }

  .ligne-stat { flex-wrap: wrap; }
  .ligne-stat .lib { flex: 1 1 100%; }

  .otp-input { font-size: 1.5rem; letter-spacing: .4em; }
  .scanner-zone { max-height: 56vh; }
  .qr-carte img { width: min(240px, 74vw); }

  dl.fiche dt { padding-top: .5rem; }
  dl.fiche dd { padding-top: .1rem; }

  /* --- Tableaux transformés en fiches empilées ---------------------------
     Chaque cellule affiche son intitulé de colonne (attribut data-libelle),
     ce qui évite le défilement horizontal sur téléphone. */
  .table-wrap { border: none; background: transparent; overflow: visible; }
  table.cartes-mobile { min-width: 0; display: block; }
  table.cartes-mobile thead { display: none; }
  table.cartes-mobile tbody { display: block; }
  table.cartes-mobile tr {
    display: block; background: #fff; border: 1px solid var(--ligne);
    border-radius: 12px; padding: .7rem .85rem; margin-bottom: .7rem;
    box-shadow: var(--ombre);
  }
  table.cartes-mobile tbody tr:nth-child(even) { background: #fff; }
  table.cartes-mobile td {
    display: flex; gap: .75rem; justify-content: space-between;
    align-items: baseline; border: none; padding: .28rem 0;
    border-bottom: 1px dashed #eef1f0;
  }
  table.cartes-mobile td:last-child { border-bottom: none; }
  table.cartes-mobile td::before {
    content: attr(data-libelle);
    flex: 0 0 40%; font-size: .7rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: .04em; color: var(--encre-douce);
  }
  table.cartes-mobile td:empty { display: none; }
  table.cartes-mobile td > * { text-align: right; }
  table.cartes-mobile .vide { display: block; }
  table.cartes-mobile .vide::before { content: none; }
}

/* --- Très petits écrans -------------------------------------------------- */
@media (max-width: 380px) {
  .grille-4 { grid-template-columns: 1fr; }
  .etapes { gap: .2rem; }
  .etape { font-size: .66rem; }
  .entete-devise { display: none; }
}

/* --- Écrans larges ------------------------------------------------------- */
@media (min-width: 1280px) {
  .wrap { width: min(1280px, 100% - 3rem); }
}

/* ------------------------------------------------------------ Impression */
@media print {
  .entete, .pied, .nav, .actions, .no-print { display: none !important; }
  body { background: #fff; }
  .carte, .qr-carte { box-shadow: none; border: 1px solid #999; }
  .page-passe { page-break-after: always; }
}
