/* ==========================================================
   Bibliothèque ATYPIC — feuille de style
   Palette reprise du logo ; les couleurs se changent dans :root.
   ========================================================== */
:root {
  /* Couleurs du logo */
  --violet: #987BB6;
  --saumon: #E88F7D;
  --bleu: #2F5FA9;
  --orange: #E04D25;
  --moutarde: #E3AE3E;
  --vert: #4FA485;
  --vert-fonce: #196A46;

  /* Interface */
  --fond: #FFFBF5;
  --surface: #FFFFFF;
  --encre: #1F2340;
  --doux: #5E6378;
  --ligne: #ECE6DC;
  --ligne-forte: #DCD5C8;
  --accent: var(--bleu);
  --accent-fonce: #234A86;
  --accent-ombre: #1B3A6B;
  --accent-clair: #E4ECF8;

  --dispo: #196A46;
  --dispo-fond: #DDF1E8;
  --emprunte: #B03A17;
  --emprunte-fond: #FCE4DA;
  --danger: #B03A17;

  --rayon: 20px;
  --ombre: 0 1px 2px rgba(31, 35, 64, .05), 0 10px 30px -14px rgba(31, 35, 64, .22);
  --police: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Une couleur par catégorie : --k (vive), --k-fond (claire), --k-texte (lisible sur fond clair) */
.c0 { --k: var(--bleu);     --k-fond: #EEF0F5; --k-texte: #44495E; }
.c1 { --k: var(--violet);   --k-fond: #EFE8F7; --k-texte: #5B3F84; }
.c2 { --k: var(--saumon);   --k-fond: #FCE7E2; --k-texte: #A0412E; }
.c3 { --k: var(--bleu);     --k-fond: #E4ECF8; --k-texte: #24508F; }
.c4 { --k: var(--orange);   --k-fond: #FCE3DA; --k-texte: #A8371A; }
.c5 { --k: var(--moutarde); --k-fond: #FBF0D6; --k-texte: #745410; }
.c6 { --k: var(--vert);     --k-fond: #DDF1E8; --k-texte: #196A46; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--fond);
  color: var(--encre);
  font: 15px/1.55 var(--police);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); }
[hidden] { display: none !important; }
.visuellement-cache { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- En-tête ---------- */
.entete { background: var(--surface); position: sticky; top: 0; z-index: 5; box-shadow: 0 1px 0 var(--ligne); }
.entete-in { max-width: 1120px; margin: 0 auto; padding: 12px 20px; display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.marque { display: flex; align-items: center; gap: 14px; text-decoration: none; color: var(--encre); }
.marque-logo { height: 34px; width: auto; display: block; }
.marque-nom { font-weight: 600; font-size: 15px; color: var(--doux); padding-left: 14px; border-left: 2px solid var(--ligne); line-height: 1.2; }
.marque-logo + .marque-nom { letter-spacing: .01em; }
.nav { display: flex; gap: 4px; margin-left: auto; flex-wrap: wrap; }
.nav a { color: var(--encre); text-decoration: none; padding: 8px 14px; border-radius: 999px; font-weight: 500; font-size: 14px; transition: background .15s; }
.nav a:hover { background: #F4F1EA; }
.nav a.actif { background: var(--accent-clair); color: var(--bleu); font-weight: 600; }
.nav .nav-discret { color: var(--doux); }
.mode-public .entete-in { justify-content: center; }
.mode-public .marque { pointer-events: none; }

/* Frise de couleurs sous l'en-tête */
.frise { display: flex; height: 5px; }
.frise span { flex: 1; }
.frise span:nth-child(1) { background: var(--violet); }
.frise span:nth-child(2) { background: var(--saumon); }
.frise span:nth-child(3) { background: var(--bleu); }
.frise span:nth-child(4) { background: var(--orange); }
.frise span:nth-child(5) { background: var(--moutarde); }
.frise span:nth-child(6) { background: var(--vert); }

/* ---------- Mise en page ---------- */
.contenu { max-width: 1120px; margin: 0 auto; padding: 32px 20px 72px; }
.mode-public .contenu { max-width: 520px; padding-top: 22px; }
.page-titre { margin-bottom: 24px; }
.page-titre-ligne { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.titre-page { font-weight: 800; font-size: 34px; line-height: 1.12; letter-spacing: -.025em; margin: 0 0 4px; }
.titre-section { font-weight: 700; font-size: 20px; line-height: 1.25; letter-spacing: -.015em; margin: 0 0 6px; }
.surtitre { text-transform: uppercase; letter-spacing: .12em; font-size: 12px; font-weight: 700; color: var(--bleu); margin: 0 0 8px; }
.texte-doux { color: var(--doux); }
.petit { font-size: 13px; }
.note { font-size: 13.5px; color: var(--doux); margin: 14px 0 0; }

.carte { position: relative; background: var(--surface); border: 1px solid var(--ligne); border-radius: var(--rayon); padding: 28px; box-shadow: var(--ombre); }
.carte-etroite { max-width: 440px; margin: 6vh auto 0; }
.carte-accent { box-shadow: inset 0 6px 0 var(--k), var(--ombre); padding-top: 32px; }
.grille-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 760px) { .grille-2 { grid-template-columns: 1fr; } }
.vide { text-align: center; padding: 44px 24px; }
.vide .bouton { margin-top: 14px; }

/* ---------- Formes géométriques (reprises du logo) ---------- */
.formes { position: relative; pointer-events: none; }
.formes span { position: absolute; display: block; }
.f-triangle { background: var(--violet); clip-path: polygon(50% 0, 100% 100%, 0 100%); }
.f-rond { background: var(--saumon); border-radius: 50%; }
.f-barre { background: var(--moutarde); border-radius: 2px; }
.f-croque { background: conic-gradient(from 60deg, transparent 0 60deg, var(--vert) 60deg); border-radius: 50%; }
.f-bulle { background: var(--bleu); border-radius: 50%; }
.f-bulle::after { content: ""; position: absolute; width: 62%; height: 62%; left: -28%; bottom: -24%; border-radius: 50%; background: var(--vert); mix-blend-mode: multiply; }

/* Rangée de petites formes (connexion, bibliothèque vide) */
.formes-coin, .formes-vide { display: flex; gap: 8px; align-items: flex-end; height: 30px; margin-bottom: 18px; }
.formes-vide { justify-content: center; height: 44px; margin-bottom: 14px; }
.formes-coin span, .formes-vide span { position: relative; flex: 0 0 auto; }
.formes-coin .f-triangle { width: 30px; height: 28px; }
.formes-coin .f-rond { width: 26px; height: 26px; }
.formes-coin .f-barre { width: 9px; height: 28px; transform: skewX(-22deg); }
.formes-coin .f-croque { width: 28px; height: 28px; }
.formes-coin .f-bulle { width: 16px; height: 16px; align-self: flex-start; }
.formes-vide .f-triangle { width: 44px; height: 40px; }
.formes-vide .f-rond { width: 38px; height: 38px; }
.formes-vide .f-barre { width: 12px; height: 42px; transform: skewX(-22deg); }
.formes-vide .f-croque { width: 42px; height: 42px; }
.formes-vide .f-bulle { width: 22px; height: 22px; align-self: flex-start; }

/* ---------- Page livre (mobile) ---------- */
.carte-livre { padding: 0; overflow: hidden; border: 0; }
.couverture { position: relative; height: 150px; background: var(--k-fond); overflow: hidden; }
.formes-couverture { position: absolute; inset: 0; }
.formes-couverture .f-triangle { width: 104px; height: 92px; left: 6%; bottom: -4px; }
.formes-couverture .f-barre { width: 26px; height: 120px; left: 31%; bottom: -14px; transform: rotate(26deg); }
.formes-couverture .f-rond { width: 88px; height: 88px; left: 45%; top: 22px; }
.formes-couverture .f-croque { width: 118px; height: 118px; right: 5%; bottom: -26px; }
.formes-couverture .f-bulle { width: 36px; height: 36px; right: 32%; top: 14px; }
.formes-couverture .f-triangle { background: var(--k); }
.carte-livre-corps { padding: 26px 24px 28px; }
.titre-livre { font-weight: 800; font-size: 30px; line-height: 1.15; letter-spacing: -.025em; margin: 0 0 18px; overflow-wrap: anywhere; }
.infos { margin: 18px 0 22px; border-top: 1px solid var(--ligne); }
.infos div { display: flex; justify-content: space-between; gap: 16px; padding: 13px 0; border-bottom: 1px solid var(--ligne); }
.infos dt { color: var(--doux); }
.infos dd { margin: 0; font-weight: 600; text-align: right; }

.confirmation { text-align: center; padding: 6px 0 4px; }
.confirmation-icone { width: 64px; height: 64px; border-radius: 50%; background: var(--vert); color: #fff; font-size: 30px; font-weight: 700; display: grid; place-items: center; margin: 0 auto 14px; box-shadow: 0 4px 0 var(--vert-fonce); }
.confirmation-titre { font-size: 22px; font-weight: 800; letter-spacing: -.02em; margin: 0 0 6px; }
.confettis { display: flex; justify-content: center; align-items: flex-end; gap: 10px; height: 34px; margin-bottom: 14px; }
.confettis span { position: relative; flex: 0 0 auto; }
.confettis .f-triangle { width: 26px; height: 24px; }
.confettis .f-rond { width: 20px; height: 20px; }
.confettis .f-barre { width: 8px; height: 28px; transform: skewX(-22deg); }
.confettis .f-croque { width: 24px; height: 24px; }
.confettis .f-bulle { width: 14px; height: 14px; align-self: flex-start; }

@media (prefers-reduced-motion: no-preference) {
  .formes-couverture span, .confettis span, .formes-coin span, .formes-vide span { animation: apparition .55s cubic-bezier(.3, 1.6, .5, 1) both; }
  .formes span:nth-child(2) { animation-delay: .06s; }
  .formes span:nth-child(3) { animation-delay: .12s; }
  .formes span:nth-child(4) { animation-delay: .18s; }
  .formes span:nth-child(5) { animation-delay: .24s; }
  .confettis span { animation-name: saut; animation-duration: .7s; }
  .formes-couverture .f-barre { animation-name: apparition-barre; }
}
@keyframes apparition { from { opacity: 0; transform: scale(.4); } }
@keyframes apparition-barre { from { opacity: 0; transform: rotate(26deg) translateY(40px); } }
@keyframes saut { 0% { opacity: 0; transform: translateY(18px) scale(.5); } 60% { opacity: 1; transform: translateY(-8px); } }

/* ---------- Statuts et pastilles ---------- */
.statut { display: inline-flex; align-items: center; gap: 7px; font-weight: 600; font-size: 13px; padding: 4px 12px 4px 10px; border-radius: 999px; margin: 0; white-space: nowrap; }
.statut .pastille { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.statut-dispo { color: var(--dispo); background: var(--dispo-fond); }
.statut-emprunte { color: var(--emprunte); background: var(--emprunte-fond); }
.carte-livre .statut { font-size: 15px; padding: 7px 16px 7px 13px; }
.pastille-cat { display: inline-block; font-size: 12px; font-weight: 600; line-height: 1.3; padding: 3px 10px; border-radius: 999px; background: var(--k-fond); color: var(--k-texte); margin: 4px 0 0; }
.carte-livre .pastille-cat { font-size: 12.5px; text-transform: uppercase; letter-spacing: .08em; font-weight: 700; margin: 0 0 12px; padding: 4px 12px; }
.retard { color: var(--danger); font-weight: 600; }

/* ---------- Formulaires ---------- */
.formulaire { display: grid; gap: 16px; margin-top: 18px; }
.champ { display: grid; gap: 6px; }
.champ > span { font-weight: 600; font-size: 14px; }
input[type=text], input[type=password], input[type=date], input[type=search], select {
  font: inherit; color: var(--encre); background: #fff;
  border: 2px solid var(--ligne-forte); border-radius: 12px; padding: 10px 14px; width: 100%;
  min-height: 48px; appearance: none; -webkit-appearance: none; transition: border-color .15s;
}
.mode-public input { font-size: 17px; min-height: 54px; }
input:hover, select:hover { border-color: #C9C1B2; }
select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%235E6378' stroke-width='1.8'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; background-size: 11px; padding-right: 38px; }
input:focus, select:focus { outline: 3px solid rgba(47, 95, 169, .2); outline-offset: 0; border-color: var(--bleu); }
button:focus-visible, a:focus-visible { outline: 3px solid rgba(47, 95, 169, .35); outline-offset: 2px; }
.case { display: flex; align-items: center; gap: 9px; font-size: 14px; cursor: pointer; }
.case input { width: 18px; height: 18px; accent-color: var(--bleu); }

.bouton {
  font: inherit; font-weight: 600; font-size: 14.5px; cursor: pointer; text-decoration: none; text-align: center;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 20px; min-height: 46px; border-radius: 999px;
  border: 2px solid var(--ligne-forte); background: var(--surface); color: var(--encre);
  transition: background .15s, border-color .15s, transform .08s, box-shadow .08s;
}
.bouton:hover { border-color: var(--bleu); color: var(--bleu); }
.bouton:disabled { opacity: .45; cursor: default; }
.bouton-plein { background: var(--bleu); border-color: var(--bleu); color: #fff; box-shadow: 0 4px 0 var(--accent-ombre); }
.bouton-plein:hover { background: var(--accent-fonce); border-color: var(--accent-fonce); color: #fff; }
.bouton-plein:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--accent-ombre); }
.bouton-large { width: 100%; min-height: 56px; font-size: 16px; }
.bouton-petit { min-height: 38px; padding: 7px 16px; font-size: 13.5px; box-shadow: 0 3px 0 var(--accent-ombre); }
.bouton-danger { color: var(--danger); }
.bouton-danger:hover { border-color: var(--danger); color: var(--danger); background: #FDF0EB; }
.bouton-icone { width: 40px; height: 40px; min-height: 40px; padding: 0; border-color: transparent; background: transparent; box-shadow: none; }
.bouton-icone:hover { background: var(--accent-clair); border-color: transparent; }
.bouton-icone svg { width: 18px; height: 18px; fill: var(--encre); }
.bouton-icone:hover svg { fill: var(--bleu); }
.lien-action { font: inherit; font-size: 13px; font-weight: 600; color: var(--bleu); background: none; border: 0; padding: 4px 0 0; cursor: pointer; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; display: block; }
.lien-action:hover { color: var(--accent-fonce); }

/* Zone de dépôt du fichier */
.depot { position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; padding: 28px 16px; border: 2px dashed #B9C8E2; border-radius: 16px; background: #F6F9FD; cursor: pointer; transition: background .15s, border-color .15s; }
.depot input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.depot-survol, .depot:hover { border-color: var(--bleu); background: var(--accent-clair); }
.depot-plein { border-style: solid; border-color: var(--bleu); background: var(--accent-clair); font-weight: 600; }
.depot-icone { width: 48px; height: 48px; border-radius: 50%; background: var(--bleu); display: grid; place-items: center; }
.depot-icone svg { width: 24px; height: 24px; fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Messages ---------- */
.flash { padding: 13px 18px; border-radius: 14px; margin-bottom: 20px; font-weight: 500; background: var(--dispo-fond); color: var(--vert-fonce); border-left: 5px solid var(--vert); }
.flash-erreur { background: #FCE8E1; color: var(--danger); border-left-color: var(--orange); }
.flash-info { background: #F0F1F5; color: var(--encre); border-left-color: var(--violet); }
.formulaire .flash { margin-bottom: 0; }
.bandeau-action { position: relative; overflow: hidden; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; background: var(--bleu); color: #fff; border-radius: var(--rayon); padding: 16px 16px 16px 24px; margin-bottom: 22px; }
.bandeau-action p { margin: 0; position: relative; }
.bandeau-action::before { content: ""; position: absolute; left: -26px; bottom: -34px; width: 72px; height: 72px; border-radius: 50%; background: var(--saumon); }
.bandeau-action { padding-left: 64px; }
.bandeau-action .bouton-plein { position: relative; z-index: 1; background: #fff; color: var(--bleu); border-color: #fff; box-shadow: 0 4px 0 var(--accent-ombre); }


/* ---------- Tableau de bord ---------- */
.chiffres { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 26px; }
.chiffre { position: relative; overflow: hidden; border-radius: var(--rayon); padding: 18px 22px; display: flex; flex-direction: column; }
.chiffre-val { font-size: 40px; font-weight: 800; line-height: 1.05; letter-spacing: -.03em; position: relative; z-index: 1; }
.chiffre-lib { font-size: 14px; font-weight: 600; position: relative; z-index: 1; }
.chiffre-forme { position: absolute; right: -10px; bottom: -14px; width: 76px; height: 76px; opacity: .9; }
.chiffre-total { background: #EFE8F7; color: #5B3F84; }
.chiffre-total .chiffre-forme { background: var(--violet); right: 4px; bottom: -6px; width: 70px; height: 64px; }
.chiffre-dispo { background: var(--dispo-fond); color: var(--vert-fonce); }
.chiffre-dispo .chiffre-forme { background: conic-gradient(from 60deg, transparent 0 60deg, var(--vert) 60deg); }
.chiffre-emprunte { background: #FCE7E2; color: #A0412E; }
.chiffre-emprunte .chiffre-forme { background: var(--saumon); }

.outils { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.outils input[type=search] { flex: 1 1 260px; width: auto; }
.outils select { flex: 0 1 230px; width: auto; }
.outils-form { display: contents; }
.onglets { display: inline-flex; background: #F1ECE3; border-radius: 999px; padding: 4px; }
.onglet { font: inherit; font-size: 13.5px; font-weight: 600; border: 0; background: transparent; color: var(--doux); padding: 8px 15px; border-radius: 999px; cursor: pointer; }
.onglet:hover { color: var(--encre); }
.onglet.actif { background: var(--surface); color: var(--bleu); box-shadow: 0 1px 3px rgba(0, 0, 0, .1); }

.selection { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: var(--accent-clair); color: var(--bleu); border-radius: 14px; padding: 8px 10px 10px 18px; margin-bottom: 12px; font-weight: 600; font-size: 14px; }

.tableau-cadre { background: var(--surface); border: 1px solid var(--ligne); border-radius: var(--rayon); overflow: hidden; box-shadow: var(--ombre); }
.tableau { width: 100%; border-collapse: collapse; }
.tableau th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--doux); font-weight: 600; padding: 13px 14px; border-bottom: 1px solid var(--ligne); background: #FCFAF6; }
.tableau td { padding: 14px; border-bottom: 1px solid #F1ECE3; vertical-align: middle; }
.tableau tbody tr:last-child td { border-bottom: 0; }
.tableau tbody tr { transition: background .12s; }
.tableau tbody tr:hover { background: #FBF8F2; }
.col-case { width: 46px; }
.col-case input { width: 18px; height: 18px; accent-color: var(--bleu); }
.col-actions { width: 100px; text-align: right; white-space: nowrap; }
.livre-titre { font-weight: 600; line-height: 1.35; }
.aucun { text-align: center; color: var(--doux); padding: 28px; margin: 0; }

@media (max-width: 760px) {
  .titre-page { font-size: 28px; }
  .marque-logo { height: 28px; }
  .chiffres { gap: 8px; }
  .chiffre { padding: 12px 14px; }
  .chiffre-val { font-size: 28px; }
  .chiffre-forme { width: 34px !important; height: 32px !important; right: -6px !important; bottom: -8px !important; opacity: .55; }
  .chiffre-lib { font-size: 12px; }
  .entete-in { gap: 10px; padding: 10px 16px; }
  .nav { margin-left: 0; width: 100%; gap: 2px; flex-wrap: nowrap; }
  .nav a { padding: 7px 11px; font-size: 13.5px; white-space: nowrap; }
  .nav .nav-discret { margin-left: auto; }
  .tableau thead { display: none; }
  .tableau, .tableau tbody, .tableau tr, .tableau td { display: block; }
  .tableau tr { position: relative; padding: 14px 16px 14px 50px; border-bottom: 1px solid #F1ECE3; }
  .tableau td { padding: 2px 0; border: 0; }
  .tableau td.col-case { position: absolute; left: 16px; top: 16px; width: auto; }
  .tableau td.col-actions { position: absolute; right: 8px; top: 8px; width: auto; }
  .tableau td:nth-child(2) { padding-right: 88px; margin-bottom: 8px; }
  .tableau td:nth-child(4), .tableau td:nth-child(5) { display: inline-block; margin-right: 10px; font-size: 14px; }
  .tableau td:nth-child(5) .petit { display: inline; margin-left: 4px; }
  .tableau td:nth-child(5) .petit::before { content: "· "; }
  .tableau td:nth-child(5) .lien-action { display: inline-block; margin-left: 10px; }
  .tableau tr[data-statut=dispo] td:nth-child(4), .tableau tr[data-statut=dispo] td:nth-child(5) { display: none; }
}

/* ---------- Fenêtres ---------- */
.fenetre { border: 0; border-radius: 24px; padding: 30px; width: min(420px, calc(100vw - 32px)); background: var(--surface); color: var(--encre); box-shadow: 0 30px 80px -20px rgba(31, 35, 64, .4); }
.fenetre::backdrop { background: rgba(31, 35, 64, .5); }
.fenetre .fermer { position: absolute; top: 14px; right: 14px; width: 38px; height: 38px; border-radius: 50%; border: 0; background: #F4F1EA; font-size: 22px; line-height: 1; color: var(--doux); cursor: pointer; }
.fenetre .fermer:hover { background: var(--accent-clair); color: var(--bleu); }
.fenetre form + form { margin-top: 10px; }
.qr-grand { width: 220px; margin: 16px auto 10px; padding: 12px; border-radius: 16px; border: 2px solid var(--ligne); }
.qr-grand svg { display: block; width: 100%; height: auto; }
.qr-lien { text-align: center; font-size: 12.5px; word-break: break-all; margin: 0 0 16px; }
.boutons { display: flex; gap: 8px; margin-top: 12px; }
.boutons .bouton { flex: 1; padding: 10px 8px; font-size: 13.5px; }
.sep { border: 0; border-top: 1px solid var(--ligne); margin: 22px 0 16px; }

/* ---------- Étiquettes ---------- */
.planche { display: grid; gap: 10px; background: #fff; border: 1px solid var(--ligne); border-radius: var(--rayon); padding: 18px; }
.planche:empty { display: none; }
.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.etiquette { min-width: 0; display: flex; gap: 10px; align-items: center; border: 1px dashed #CFC6B5; border-left: 3mm solid var(--k); border-radius: 8px; padding: 9px 10px; break-inside: avoid; page-break-inside: avoid; }
.etiquette-qr { flex: 0 0 auto; width: 28mm; }
.cols-2 .etiquette-qr { width: 36mm; }
.cols-4 .etiquette-qr { width: 22mm; }
.etiquette-qr svg { display: block; width: 100%; height: auto; }
.etiquette-texte { min-width: 0; }
.etiquette-titre { font-weight: 700; font-size: 12px; line-height: 1.25; letter-spacing: -.01em; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.cols-2 .etiquette-titre { font-size: 14px; }
.cols-4 .etiquette-titre { font-size: 10px; -webkit-line-clamp: 3; }
.etiquette-categorie { display: inline-block; font-size: 8.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--k-texte); background: var(--k-fond); font-weight: 700; margin-top: 4px; padding: 1px 6px; border-radius: 99px; }
.etiquette-aide { display: flex; flex-direction: column; gap: 3px; font-size: 7.5px; color: var(--doux); margin-top: 6px; line-height: 1.3; }
.etiquette-logo { height: 3.6mm; width: auto; display: block; }
.cols-2 .etiquette-logo { height: 4.5mm; }
.cols-4 .etiquette { flex-direction: column; text-align: center; gap: 6px; border-left-width: 1px; border-top: 2.5mm solid var(--k); }
.cols-4 .etiquette-aide { display: none; }
.sans-categorie .etiquette-categorie { display: none; }

@media (max-width: 760px) {
  .cols-3, .cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cols-2 { grid-template-columns: 1fr; }
}

@media print {
  @page { size: A4; margin: 10mm; }
  body { background: #fff; }
  .entete, .no-print, .flash { display: none !important; }
  .contenu { padding: 0; max-width: none; }
  .planche { border: 0; padding: 0 1mm; border-radius: 0; gap: 4mm; }
  .cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
  .cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; }
  .etiquette { border-color: #bbb; border-left-color: var(--k); }
  .cols-4 .etiquette { border-left-color: #bbb; border-top-color: var(--k); }
  .etiquette, .etiquette * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
