/* Polices servies par l'application (licences dans polices/) : rien n'est demandé à internet. */
@font-face { font-family:"Atkinson Hyperlegible"; font-weight:400; font-display:swap;
  src:url("polices/atkinson-hyperlegible-latin-400-normal.woff2") format("woff2"); unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family:"Atkinson Hyperlegible"; font-weight:400; font-display:swap;
  src:url("polices/atkinson-hyperlegible-latin-ext-400-normal.woff2") format("woff2"); unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family:"Atkinson Hyperlegible"; font-weight:700; font-display:swap;
  src:url("polices/atkinson-hyperlegible-latin-700-normal.woff2") format("woff2"); unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family:"Atkinson Hyperlegible"; font-weight:700; font-display:swap;
  src:url("polices/atkinson-hyperlegible-latin-ext-700-normal.woff2") format("woff2"); unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family:"Chakra Petch"; font-weight:700; font-display:swap;
  src:url("polices/chakra-petch-latin-700-normal.woff2") format("woff2"); unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family:"Chakra Petch"; font-weight:700; font-display:swap;
  src:url("polices/chakra-petch-latin-ext-700-normal.woff2") format("woff2"); unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family:"Permanent Marker"; font-weight:400; font-display:swap;
  src:url("polices/permanent-marker-latin-400-normal.woff2") format("woff2"); unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
:root {
  --fond:#252c38; --nuit:#1b212c; --noir:#151a22; --texte:#f4f6f9; --doux:#c3cad6; --trait:#4b5363;
  --clair:#e9edf2; --jaune:#ffd43b; --scotch:#ebdca9; --alerte:#e5322d;
  --titre:"Chakra Petch", Bahnschrift, "Segoe UI", system-ui, sans-serif;
  --main:"Permanent Marker", "Segoe Print", "Marker Felt", "Comic Sans MS", cursive;
}
* { box-sizing:border-box; }
body { margin:0; font:16px/1.45 "Atkinson Hyperlegible", "Segoe UI", system-ui, sans-serif; color:var(--texte); background:var(--fond); }
header { display:flex; flex-wrap:wrap; gap:.4rem 1rem; align-items:center; padding:.6rem 1rem; background:var(--nuit); }
header strong { font:700 1.15rem var(--titre); }
header nav { display:flex; flex-wrap:wrap; gap:.2rem .9rem; flex:1; }
header nav a { padding:.45rem 0; color:var(--texte); text-decoration:none; }
header form { margin:0; }
main { max-width:70rem; margin:0 auto; padding:1rem; }
footer { color:var(--doux); font-size:.8rem; text-align:center; padding:1rem; }
a { color:var(--jaune); }
h1, h2 { font-family:var(--titre); }
h1 { font-size:1.6rem; margin:.3rem 0 .8rem; }
h2 { font-size:1.2rem; margin:1.5rem 0 .6rem; }
label { display:block; margin:0 0 .8rem; font-weight:700; }
label.case { font-weight:400; display:flex; gap:.5rem; align-items:center; }
input, select, textarea { display:block; width:100%; margin-top:.25rem; padding:.65rem; font:inherit; font-weight:400;
  border:2px solid #b4bcc8; border-radius:.7rem; background:#fff; color:var(--noir); }
input[type=checkbox], input[type=radio] { width:1.3rem; height:1.3rem; margin:0; flex:none; }
button, .bouton { display:inline-block; min-height:2.9rem; padding:.6rem 1.1rem; font:inherit; font-weight:700; border:0;
  border-radius:.8rem; background:var(--jaune); color:var(--noir); cursor:pointer; text-decoration:none; }
button.sombre, .bouton.sombre { background:var(--noir); color:#fff; }
button.discret { background:transparent; color:inherit; border:2px solid var(--trait); font-weight:400; }
button.danger { background:#a32f2f; color:#fff; }
button:disabled { opacity:.35; cursor:default; }
:focus-visible { outline:3px solid #3b9bff; outline-offset:2px; }
.fiche { max-width:32rem; }
.deux { display:grid; grid-template-columns:1fr 1fr; gap:0 .8rem; }
.erreur, .alerte, .ok { padding:.7rem .9rem; border-radius:.7rem; border:1px solid; color:var(--noir); }
.erreur { background:#fdecec; border-color:#d88; }
.alerte { background:#fff5dc; border-color:#d9b25a; }
.ok { background:#eaf6ea; border-color:#8c8; }
.liste { list-style:none; margin:0; padding:0; }
.liste li { border-bottom:1px solid var(--trait); }
.liste a { display:flex; gap:.8rem; align-items:center; padding:.6rem 0; color:inherit; text-decoration:none; }
.liste img, .sans-photo { width:64px; height:64px; object-fit:cover; border-radius:.5rem; background:var(--trait); flex:none; }
.liste small, .doux { color:var(--doux); }
.liste .qte { margin-left:auto; text-align:right; white-space:nowrap; }
.liste li:has(.coche) { display:flex; align-items:center; }
.liste li:has(.coche) a { flex:1; min-width:0; }
.coche { display:flex; align-items:center; align-self:stretch; margin:0; padding:0 .8rem 0 .2rem; cursor:pointer; }
.coche input { margin:0; }
.barre { position:sticky; bottom:0; padding:.6rem 0; background:var(--fond); }
.photos { display:flex; flex-wrap:wrap; gap:.6rem; }
.photos img { width:140px; height:140px; object-fit:cover; border-radius:.5rem; }
.table { overflow-x:auto; }
table { border-collapse:collapse; width:100%; }
th, td { border-bottom:1px solid var(--trait); padding:.45rem .6rem; text-align:left; }
td.n, th.n { text-align:right; white-space:nowrap; }
.chiffres { display:flex; gap:2rem; flex-wrap:wrap; }
.chiffres b { display:block; font:700 1.8rem var(--titre); }
.qr svg { width:min(80vw, 22rem); height:auto; background:#fff; }
@media (max-width:34rem) { .deux { grid-template-columns:1fr; } }

/* ---------- les onglets des paramètres, la documentation ---------- */
.envois { list-style:none; margin:1rem 0; padding:0; }
.envois li { padding:.6rem 0; border-bottom:1px solid var(--trait); overflow-wrap:anywhere; }
.envois label.case { margin:0; }
.envois small { display:block; }
.onglets { display:flex; flex-wrap:wrap; gap:.3rem; margin:0 0 1rem; border-bottom:2px solid var(--trait); }
.onglets a { display:flex; align-items:center; min-height:2.9rem; padding:0 .9rem; margin-bottom:-2px; border-bottom:4px solid transparent;
  color:var(--texte); font-weight:700; text-decoration:none; }
.onglets a[aria-current] { border-bottom-color:var(--jaune); color:var(--jaune); }
.texte { max-width:46rem; overflow-wrap:anywhere; }
.texte h2 { margin-top:2rem; }
.texte h3 { font-family:var(--titre); font-size:1.05rem; margin:1.3rem 0 .4rem; }
.texte li { margin-bottom:.3rem; }
.sommaire { display:flex; flex-wrap:wrap; gap:0 2.5rem; }
.sommaire ul { padding-left:1.1rem; }
.capture { margin:1rem 0 1.4rem; }
.capture img { display:block; max-width:100%; height:auto; border:2px solid var(--trait); border-radius:.7rem; }
.capture.tel { max-width:18rem; }
.capture figcaption { color:var(--doux); font-size:.9rem; margin-top:.35rem; }
@media (max-width:34rem) { .onglets { gap:0 .1rem; } .onglets a { min-height:2.7rem; padding:0 .45rem; font-size:.9rem; } }

/* ---------- le rayonnage ---------- */
.page-rayon main { max-width:none; padding:0; }
.page-rayon main > .alerte, .page-rayon main > .ok, .page-rayon main > .erreur { margin:.6rem 1rem; }
.page-rayon footer { display:none; }
.cote { padding:.8rem 1rem .2rem; }
.chercher input { margin:0; min-height:3.1rem; border:0; border-radius:.9rem; font-weight:700; }
.espaces { display:flex; gap:.5rem; overflow-x:auto; padding:.7rem 0 .3rem; }
.espace { flex:none; display:flex; align-items:center; justify-content:space-between; gap:.6rem; min-height:2.9rem; padding:0 1rem;
  border:2px solid #596274; border-radius:.9rem; color:var(--texte); font-weight:700; text-decoration:none; white-space:nowrap; transition:background .25s; }
.espace small { font-weight:400; }
.espace.trouvee { border-color:var(--jaune); }
.espace.actif { background:var(--jaune); border-color:var(--jaune); color:var(--noir); }
.espace.ajout { border-style:dashed; }
.titre-mur { display:flex; justify-content:space-between; align-items:center; gap:1rem; padding:.4rem 1rem; }
.titre-mur h1 { margin:0; overflow-wrap:anywhere; }
.titre-mur p { margin:0; font-size:.9rem; color:var(--doux); }
.titre-mur .bouton { flex:none; }
.invite { margin:0; padding:.8rem 1rem; font-size:.85rem; text-align:center; color:var(--doux); }

.titre-etagere { display:flex; flex-wrap:wrap; align-items:center; gap:.2rem 1.2rem; padding:.2rem 1rem; }
.titre-etagere h2 { margin:.6rem 0; }
.titre-etagere a { font-size:.9rem; }
.renommer { min-width:0; }
.renommer summary { display:flex; align-items:center; gap:.5rem; min-height:2.9rem; cursor:pointer; list-style:none; }
.renommer summary::-webkit-details-marker { display:none; }
.renommer summary h1, .renommer summary h2 { margin:0; overflow-wrap:anywhere; }
.renommer .crayon { opacity:.6; }
.renommer[open] summary { display:none; }
.renommer form { display:flex; gap:.4rem; margin:0; }
.renommer input { margin:0; width:14rem; max-width:100%; min-width:0; flex:1; }
.grille { display:flex; flex-wrap:wrap; gap:.2rem 1.2rem; margin:0; }
.compteur { display:flex; align-items:center; gap:.4rem; font-size:.9rem; color:var(--doux); white-space:nowrap; }
.compteur b { min-width:1.6rem; text-align:center; font:700 1.2rem var(--titre); color:var(--texte); }
button.pas-grille { width:2.6rem; min-height:2.6rem; padding:0; background:var(--nuit); color:var(--texte); border:2px solid #596274; font-size:1.4rem; }
.defile { overflow-x:auto; padding:6px 6px 0; }
/* l'étagère en isométrie : à l'échelle de l'écran, sans devenir illisible (elle défile alors sur le côté) */
svg.etageres { display:block; margin:0 auto; width:100%; height:auto; min-width:calc(var(--l) * 1px); max-width:calc(var(--l) * 1.5px); }
.etageres polygon { stroke:#12151c; stroke-width:.6; stroke-linejoin:round; }
.etageres .planche polygon { fill:#5f687a; }
.etageres .planche polygon:first-child { fill:#8b94a6; }
.etageres .planche polygon:last-child { fill:#b9c1ce; fill-opacity:.2; }      /* on voit à travers ce qui est derrière */
.etageres .montant polygon { fill:#6b7485; }
.etageres .rako .face1 { fill:#9aa4b1; }
.etageres .rako .face2 { fill:#687280; }
.etageres .rako .face3 { fill:#c3cad3; }
.etageres .carton .face1 { fill:#c4945c; }
.etageres .carton .face2 { fill:#8f6a3f; }
.etageres .carton .face3 { fill:#e0b684; }
.etageres rect.ruban { fill:var(--scotch); }
.etageres text { text-anchor:middle; font-family:"Atkinson Hyperlegible", "Segoe UI", sans-serif; font-weight:700; }
.etageres .ecrit { fill:#12151c; font:400 8.5px var(--main); }
.etageres .tuile { position:static; width:auto; height:auto; margin:0; transition:opacity .3s, filter .3s; }
.etageres .tuile:hover { transform:none; filter:brightness(1.12); }
.etageres .tuile.trouvee { transform:none; filter:drop-shadow(0 0 6px var(--jaune)); }
.etageres .tuile.trouvee polygon { stroke:var(--jaune); stroke-width:1.6; }
.etageres .marque circle { fill:var(--alerte); stroke:#fff; stroke-width:1.5; }
.etageres .marque .pastille { position:static; border:0; background:none; min-width:0; fill:#fff; font-size:10px; animation:none; }
.etageres .marque.estompee, .etageres .marque.trouvee { display:none; }
.etageres .bulle text { fill:var(--jaune); font-size:9px; stroke:var(--noir); stroke-width:3px; paint-order:stroke; }
/* seul le « + » se touche : le reste de l'ouverture ne doit pas cacher les caisses du dessous */
.etageres .place-libre polygon { fill:none; stroke:#7c879a; stroke-width:.8; stroke-dasharray:4 3; stroke-opacity:.6; pointer-events:none; }
.etageres .place-libre circle { fill:transparent; stroke:none; }
.etageres .place-libre text { fill:var(--texte); font-size:16px; }
.etageres .place-libre:hover circle { fill:rgba(255,212,59,.3); }
.etageres .ajouter-ici circle { fill:var(--nuit); stroke:#aab3c2; }
.etageres .ajouter-ici text { fill:#fff; font-size:13px; }
.etageres a:focus-visible polygon, .etageres a:focus-visible circle { stroke:#3b9bff; stroke-width:2; }

/* le local vu de dessus : un mur par côté */
.local { display:flex; flex-wrap:wrap; align-items:center; gap:.8rem 1.4rem; padding:.2rem 1rem; }
.plan { display:grid; grid-template-columns:3rem 11rem 3rem; grid-template-rows:2.9rem 4.6rem 2.9rem; gap:3px;
  grid-template-areas:". fond ." "gauche sol droite" ". entree ."; }
.plan a { display:flex; align-items:center; justify-content:center; gap:.3rem; border:2px solid #aab3c2; border-radius:.4rem;
  background:#3a4353; color:var(--texte); font-weight:700; font-size:.85rem; text-decoration:none; }
.plan a.vide { border-style:dashed; background:transparent; font-weight:400; }
.plan a.trouvee { border-color:var(--jaune); box-shadow:0 0 8px var(--jaune); }
.plan a.actif { background:var(--jaune); border-color:var(--jaune); color:var(--noir); }
.plan .mur-fond { grid-area:fond; }
.plan .mur-gauche, .plan .mur-droite { writing-mode:vertical-rl; }
.plan .mur-gauche { grid-area:gauche; transform:rotate(180deg); }
.plan .mur-droite { grid-area:droite; }
.plan .mur-entree { grid-area:entree; }
.plan .sol { grid-area:sol; display:flex; align-items:center; justify-content:center; background:var(--nuit); color:var(--doux); font-size:.85rem; }
.aide-local { display:flex; flex-direction:column; gap:.4rem; align-items:flex-start; }
.a-placer { padding:.5rem .8rem; border:2px dashed var(--jaune); border-radius:.6rem; font-weight:700; text-decoration:none; }
.a-placer.actif { background:var(--jaune); color:var(--noir); }
.dimensions summary { cursor:pointer; min-height:2.4rem; padding-top:.5rem; color:var(--doux); }
.dimensions form { margin:.4rem 0; max-width:18rem; }
.nom-mur { margin:.8rem 1rem 0; }
.trop { margin:.2rem 1rem; color:var(--jaune); font-weight:700; }
.sans-etagere { margin:.6rem 1rem; }
.choix-mur { margin:0; }
.choix-mur select { margin:0; width:auto; min-height:2.6rem; padding:.3rem .5rem; }
.dans-la-case .scotch { width:auto; min-width:7rem; }
.dans-la-case a { justify-content:flex-start; }
.dans-la-case small { color:#4a5568 !important; }
.pour-carton { margin-bottom:.4rem; }
form:has(input[name=type][value=RAKO]:checked) .pour-carton { display:none; }
.au-sol { display:flex; flex-wrap:wrap; gap:.4rem; padding:30px 1rem 0; }
.au-sol .case-rayon { width:160px; height:150px; }
.ajout-etagere { margin:1rem; }
.case-rayon { display:flex; align-items:flex-end; justify-content:center; padding-bottom:22px; min-width:0; }
.tuile { position:relative; width:136px; height:112px; margin-right:10px; color:#12151c; text-decoration:none;
  transition:transform .4s cubic-bezier(.3,1.7,.5,1), opacity .3s, filter .3s; }
.tuile:hover { transform:translateY(-6px); }
.boite { position:absolute; inset:0; display:flex; align-items:flex-end; justify-content:center; padding:0 7px 16px; border-radius:3px; }
.boite::before, .boite::after { content:""; position:absolute; }
.boite::before { left:0; right:0; bottom:100%; height:20px; transform:skewX(-36deg); transform-origin:bottom left; }
.boite::after { left:100%; top:-10px; width:12px; height:100%; transform:skewY(-54deg); transform-origin:top left; }
.rako .boite { background:repeating-linear-gradient(90deg, #9aa4b1 0 24px, #8d97a5 24px 28px); border-top:13px solid #b4bcc8; }
.rako .boite::before { background:#c3cad3; bottom:calc(100% + 13px); }
.rako .boite::after { background:#687280; }
.carton { height:122px; }
.carton .boite { background:linear-gradient(90deg, transparent calc(50% - 15px), #a87c49 0 calc(50% + 15px), transparent 0) top/100% 28px no-repeat #c4945c; }
.carton .boite::before { background:#d9ae77; }
.carton .boite::after { background:#8f6a3f; }
.hors { height:80px; }
.hors .boite { background:#3a4353; border:2px dashed #aab3c2; }
.hors .boite::before, .hors .boite::after { display:none; }
.scotch { position:relative; display:block; width:100%; padding:8px 8px 7px; background:var(--scotch); color:#12151c;
  font:400 1.05rem/1.15 var(--main); text-align:center; overflow-wrap:anywhere; transform:rotate(-1.5deg);
  box-shadow:0 2px 3px rgba(0,0,0,.4);
  clip-path:polygon(0 8%,5% 0,97% 3%,100% 20%,96% 38%,100% 58%,95% 76%,99% 100%,3% 95%,0 80%,4% 60%,0 42%,5% 24%); }
.au-sol .case-rayon:nth-child(even) .scotch { transform:rotate(1.5deg); }
.pastille { position:absolute; right:-8px; top:-10px; min-width:28px; height:28px; border:3px solid #fff; border-radius:28px;
  background:var(--alerte); color:#fff; font:700 14px/22px var(--titre); text-align:center; animation:pouls 1.4s ease-in-out infinite; }
.extrait { position:absolute; left:-4px; right:-4px; top:-46px; padding:4px 6px; border-radius:8px; background:var(--jaune);
  font-size:13px; font-weight:700; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; animation:flotte 1.3s ease-in-out infinite; }
.tuile.trouvee { transform:translateY(-6px) scale(1.05); filter:drop-shadow(0 0 12px var(--jaune)); }
.tuile.estompee { opacity:.28; }
.anime .case-rayon { animation:tombe .65s cubic-bezier(.3,1.35,.5,1) both; }
.anime .case-rayon:nth-child(2) { animation-delay:.06s; }
.anime .case-rayon:nth-child(3) { animation-delay:.12s; }
.anime .case-rayon:nth-child(4) { animation-delay:.18s; }
.anime .case-rayon:nth-child(n+5) { animation-delay:.24s; }

/* une caisse ouverte (ou un formulaire de création) : feuille en bas sur téléphone, colonne à droite sur PC */
.fenetre { display:none; }
.fenetre:target, .fenetre.ouverte { display:block; }
/* une autre fenêtre demandée par l'adresse remplace celle que le serveur avait ouverte */
body:has(.fenetre:target) .fenetre.ouverte:not(:target) { display:none; }
.voile { position:fixed; inset:0; z-index:5; background:rgba(8,11,16,.72); animation:voile .25s both; }
.panneau { position:fixed; z-index:6; left:0; right:0; bottom:0; max-height:90vh; overflow-y:auto; padding:1rem;
  border-radius:1.6rem 1.6rem 0 0; background:var(--clair); color:var(--noir); animation:monte .45s cubic-bezier(.2,1.15,.35,1) both; }
.panneau a:not(.bouton) { color:#1b4f9c; }
.panneau .doux { color:#4a5568; }
.tete { display:flex; justify-content:space-between; align-items:center; gap:.8rem; }
.tete h2 { margin:0; font:400 1.7rem/1.2 var(--main); overflow-wrap:anywhere; }
.tete .renommer { flex:1; }
.contenu { list-style:none; margin:.9rem 0; padding:12px; border:10px solid #9aa4b1; border-radius:1rem; background:#5b6573; }
ul.contenu { height:auto; }          /* .carton et .hors donnent aussi la hauteur des tuiles du rayonnage */
.contenu.carton { border-color:#c4945c; background:#8f6a3f; }
.contenu.hors { border:2px dashed #7c879a; background:#5b6573; }
.contenu li { margin:0 0 10px; padding:12px; border-radius:.9rem; background:#fff; box-shadow:0 6px 12px rgba(0,0,0,.28);
  animation:jaillit .5s cubic-bezier(.2,1.6,.4,1) both; }
.contenu li:last-child { margin-bottom:0; }
.contenu li { color:var(--noir); }     /* carte blanche, aussi hors d'une fenêtre (dépôt, outils) */
.contenu li a { color:#1b4f9c; }
.contenu li .doux { color:#4a5568; }
.contenu li:nth-child(2) { animation-delay:.08s; }
.contenu li:nth-child(3) { animation-delay:.16s; }
.contenu li:nth-child(n+4) { animation-delay:.22s; }
.ajuster { margin:0; }
.ligne { display:flex; align-items:center; gap:8px; }
.ligne .nom { flex:1; min-width:0; display:flex; align-items:center; gap:8px; text-decoration:none; color:var(--noir) !important; }
.ligne .nom img { width:48px; height:48px; border-radius:.5rem; object-fit:cover; flex:none; }
.ligne .nom span { min-width:0; overflow-wrap:anywhere; }
.ligne small { display:block; color:#4a5568; }
.ligne small.manque { color:#b4231f; }
.pas { width:2.8rem; padding:0; flex:none; background:var(--noir); color:#fff; font-size:1.5rem; }
.valeur { width:3.2rem; text-align:center; flex:none; }
.valeur b { display:block; font:700 1.5rem var(--titre); }
.confirmer { display:flex; flex-wrap:wrap; gap:8px; margin-top:10px; }
.confirmer[hidden] { display:none; }
.confirmer .principal { flex:1 1 100%; }
.confirmer .discret { flex:1; border-color:#b4bcc8; }
.scotch-saisie { background:var(--scotch); border:0; border-radius:0; font:400 1.25rem var(--main); }
.choix { display:flex; align-items:center; gap:.6rem; padding:.8rem; margin-bottom:.8rem; border:3px solid transparent; border-radius:.8rem; }
.choix.rako { background:#c3cad3; }
.choix.carton { background:#d9ae77; height:auto; }
.choix:has(:checked) { border-color:var(--noir); }

.poser-hors, .bloc-hors { display:none; }
.contenus { display:none; }          /* liste du contenu : sur le PC seulement */
@media (min-width:68rem) {
  .page-rayon { display:flex; flex-direction:column; height:100vh; --droite:400px; }
  .page-rayon header { flex:none; }
  .page-rayon main { flex:1; min-height:0; width:100%; display:flex; flex-direction:column; margin:0; }
  .rayon { flex:1; min-height:0; display:grid; grid-template-columns:260px minmax(0,1fr) var(--droite); grid-template-rows:minmax(0,1fr); }
  .rayon::after { content:""; grid-column:3; grid-row:1; background:var(--clair); }
  .cote { grid-column:1; grid-row:1; padding:1rem; background:var(--nuit); overflow-y:auto; }
  .espaces { flex-direction:column; overflow:visible; }
  .espace { white-space:normal; }
  .mur { grid-column:2; grid-row:1; overflow-y:auto; padding-bottom:1rem; }
  .titre-mur { padding:1rem 1.2rem .8rem; }
  .invite { display:none; }
  .contenus { display:block; grid-column:3; grid-row:1; z-index:1; overflow-y:auto; padding:1rem; background:var(--clair); color:var(--noir); }
  .contenus h2 { margin:0 0 .8rem; font-size:1.1rem; }
  .contenus section { background:#fff; border-radius:12px; padding:.5rem .8rem; margin-bottom:.6rem; }
  .contenus h3 { margin:0; font-size:1rem; }
  .contenus h3 a { color:var(--noir); }
  .contenus ul { list-style:none; margin:.2rem 0 0; padding:0; }
  .contenus li { display:flex; justify-content:space-between; gap:1rem; border-top:1px solid #e3e6ec; padding:.25rem 0; }
  .contenus li span + span { text-align:right; }
  .contenus li.trouve { background:#fff1b8; }
  .contenus li.vide { color:#4a5568; }
  .contenus .manque { color:#b3202a; font-weight:700; }
  .voile { display:none; }
  .panneau { left:auto; top:var(--haut, 4.2rem); width:var(--droite); max-height:none; border-radius:0; animation:glisse .35s ease-out both; }
}
/* PC : les étagères d'un mur côte à côte, à la hauteur de l'écran ; le plan du local passe à gauche */
@media (min-width:68rem) {
  .mur { container-type:size; }
  .titre-mur { padding:.7rem 1rem .4rem; }
  .nom-mur { display:none; }
  .modules { display:flex; flex-wrap:wrap; align-items:flex-start; gap:.8rem; padding:0 1rem; }
  /* largeur du dessin : à la hauteur de l'écran, un peu moins si cela suffit pour garder toutes les étagères de front */
  .module { --part:calc((100cqw - 2rem - (var(--n) - 1) * .8rem) / var(--n) - 1rem);
    --dessin:max(calc(var(--l) * .8px), min(100cqw - 3rem, (100cqh - 15rem) * var(--l) / var(--h), max(19rem, var(--part))));
    width:max(20rem, var(--dessin) + 1rem); max-width:100%; padding:.3rem 0 .5rem; border-radius:1rem; background:var(--nuit); }
  .module .titre-etagere { gap:0 .7rem; padding:0 .6rem; }
  .module .titre-etagere h2 { margin:0; font-size:1rem; }
  .module .renommer summary { min-height:2rem; }
  .module .titre-etagere > a { font-size:.8rem; }
  .module .grille { width:100%; gap:.2rem .7rem; }
  .module .compteur { gap:.2rem; font-size:.75rem; }
  .module .compteur b { min-width:1rem; font-size:1rem; }
  .module button.pas-grille { width:2rem; min-height:2rem; border-width:1px; font-size:1.1rem; }
  .module .choix-mur select { min-height:2rem; padding:.1rem .4rem; font-size:.8rem; }
  .module .defile { padding:4px .5rem 0; }
  .hors-tuile { display:none; }
  .modules .sans-etagere { flex-basis:100%; margin:0; }
  .bloc-hors { display:block; flex:1 1 17rem; min-width:17rem; align-self:stretch; padding:.6rem .8rem; border-radius:1rem; background:var(--nuit); }
  .bloc-hors h2 { margin:.2rem 0 .6rem; font-size:1rem; }
  .bloc-hors h2 a { color:inherit; }
  .bloc-hors ul { display:grid; grid-template-columns:repeat(auto-fill,minmax(15rem,1fr)); gap:.4rem; align-content:start; margin:0; padding:0; list-style:none; }
  .bloc-hors li a { display:flex; justify-content:space-between; gap:1rem; height:100%; padding:.5rem .8rem; border-radius:.6rem; background:#fff; color:#151a22; text-decoration:none; }
  .bloc-hors li.trouve a { background:#fff1b8; }
  .bloc-hors .manque { color:#b3202a; font-weight:700; }
  .module svg.etageres { width:var(--dessin); min-width:0; max-width:none; }
  .cote .local { padding:.8rem 0 0; gap:.4rem; }
  .cote .plan { width:100%; grid-template-columns:2.4rem minmax(0,1fr) 2.4rem; grid-template-rows:2.4rem 3.4rem 2.4rem; }
}
/* écran très large : le contenu des caisses sur deux colonnes, la caisse ouverte sur la même largeur */
@media (min-width:130rem) {
  .page-rayon { --droite:760px; }
  .contenus { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); align-content:start; align-items:start; column-gap:.8rem; }
  .contenus h2 { grid-column:1 / -1; }
}
/* Glisser-déposer : seulement à la souris, sur grand écran. */
.deplacement { display:flex; align-items:center; justify-content:space-between; gap:.8rem; flex-wrap:wrap;
  margin:.6rem 1rem 0; padding:.4rem .8rem; border-radius:.8rem; background:#e8f6ec; color:#14351f; }
.deplacement form { margin:0; }
.deplacement button { width:auto; margin:0; min-height:2.2rem; background:#fff; color:#151a22; }
.fantome { position:fixed; left:0; top:0; z-index:100; pointer-events:none; padding:.3rem .7rem; border-radius:.4rem;
  background:#ffd43b; color:#151a22; font-weight:700; box-shadow:0 .4rem 1rem rgba(0,0,0,.45); }
@media (min-width:68rem) and (pointer:fine) {
  [data-deplacer] { cursor:grab; user-select:none; }
  .glisse-article .poser-hors { display:block; position:fixed; left:50%; bottom:1.2rem; transform:translateX(-50%);
    z-index:20; padding:1.2rem 3rem; border-radius:12px; background:#fff; color:var(--noir); font-weight:700; white-space:nowrap; }
  body.glisse, body.glisse * { cursor:grabbing !important; user-select:none; }
  .glisse-caisse :is(.espaces, .plan) a[data-vers-caisse]:not(.actif), .glisse-article .espaces a[data-vers-article],
  .glisse-article :is(.contenus section, .au-sol a, .bloc-hors, .poser-hors)[data-vers-article] { outline:2px dashed #ffd43b; outline-offset:2px; }
  .glisse-caisse :is(.espaces, .plan) a.survol:not(.actif), .glisse-article .espaces a.survol,
  .glisse-article :is(.contenus section, .au-sol a, .bloc-hors, .poser-hors).survol { outline:4px solid #ffb000; }
  .glisse-caisse svg.etageres [data-vers-caisse] :is(polygon, circle),
  .glisse-article svg.etageres [data-vers-article] polygon { stroke:#ffd43b; stroke-width:2.5; }
  .glisse svg.etageres .survol :is(polygon, circle) { fill:#ffd43b; stroke:#ffb000; stroke-width:3; }
}

@keyframes tombe { from { opacity:0; transform:translateY(-120px); } }
@keyframes monte { from { transform:translateY(100%); } }
@keyframes glisse { from { opacity:0; transform:translateX(80px); } }
@keyframes voile { from { opacity:0; } }
@keyframes jaillit { from { opacity:0; transform:translateY(60px) scale(.7); } }
@keyframes pouls { 50% { transform:scale(1.2); } }
@keyframes flotte { 50% { transform:translateY(-5px); } }
@media (prefers-reduced-motion:reduce) { * { animation:none !important; transition:none !important; } }

/* téléphone : tout le menu reste visible, sur deux lignes */
@media (max-width:34rem) {
  header { justify-content:space-between; }
  header nav { order:3; flex:1 0 100%; white-space:nowrap; }
  header button { min-height:2.4rem; padding:.3rem .8rem; }
}

/* budget */
details.fiche { margin:1rem 0; }
details.fiche summary { list-style:none; cursor:pointer; margin-bottom:.8rem; }
details.fiche summary::-webkit-details-marker { display:none; }

/* rapports : à l'impression, seul le rapport reste, en noir sur blanc */
.imprime { display:none; }
@media print {
  body { background:#fff; color:#000; font-size:11pt; }
  header, footer, .ecran { display:none; }
  .imprime { display:block; }
  main { max-width:none; padding:0; }
  .table { overflow:visible; }
  th, td { border-color:#999; }
  tr { break-inside:avoid; }
}

/* Dépôt : la liste des articles directement dans la page */
.depot { padding:0 1rem; max-width:44rem; }
.choix.sorte { background:var(--fond); color:inherit; border-color:rgba(127,127,127,.35); }
.contenu li.trouve { outline:4px solid var(--jaune); }
.en-depot { padding:1rem 1rem 0; margin:0; }

/* Étiquettes : des puces à toucher */
fieldset.etiquettes { border:0; padding:0; margin:0 0 .8rem; display:flex; flex-wrap:wrap; gap:.4rem; }
fieldset.etiquettes legend { padding:0; margin-bottom:.3rem; }
fieldset.etiquettes > input { flex:1 1 100%; margin:0; }
.puce { display:inline-flex; align-items:center; min-height:2.4rem; margin:0; padding:.2rem .8rem; border:2px solid rgba(127,127,127,.45);
  border-radius:2rem; cursor:pointer; text-decoration:none; color:inherit; position:relative; }
.puce input { position:absolute; opacity:0; width:1px; height:1px; }
.puce:has(:checked), .puce.actif { background:var(--jaune); border-color:var(--jaune); color:#1b1b1b; font-weight:600; }
.puce:has(:focus-visible) { outline:3px solid var(--jaune); outline-offset:2px; }
.filtres { display:flex; flex-wrap:wrap; gap:.35rem; margin:.4rem 0; }

/* Outils */
.titre-page { display:flex; justify-content:space-between; align-items:center; gap:1rem; }
.outil { margin:1rem 0; padding:1rem; border:2px solid rgba(127,127,127,.35); border-radius:1rem; max-width:44rem; scroll-margin-top:5rem; }
.tete-outil { display:flex; gap:.8rem; align-items:flex-start; }
.tete-outil img, .tete-outil .sans-photo { width:5rem; height:5rem; flex:none; object-fit:cover; border-radius:.6rem; }
.tete-outil h2 { margin:0; overflow-wrap:anywhere; }
.tete-outil p { margin:0; }
.tete-outil .sorti { color:var(--jaune); font-weight:700; }
.pret { display:flex; flex-wrap:wrap; gap:.5rem; margin:.8rem 0 0; }
.pret input, .pret select { flex:1 1 12rem; margin:0; }
.outil h3 { margin:1rem 0 0; font-size:1rem; }
.delier { margin:.4rem 0 0; text-align:right; }
.vers-outil { margin-left:auto; align-self:center; }

/* Saisie rapide */
.saisir { display:none; margin-left:auto; padding:.45rem .9rem; border-radius:2rem; background:var(--jaune); color:#1b1b1b; font-weight:700; text-decoration:none; }
@media (max-width:48rem) {
  .saisir { display:inline-block; }
  header nav a[href="/articles/nouveau"] { display:none; }     /* « + Article » le remplace */
}
@media (max-width:34rem) { header strong { font-size:1rem; } header .saisir { padding:.35rem .7rem; } header .prenom { display:none; } }
.natures .puce { flex:1; justify-content:center; }
.saisie:has(input[value="OUTIL"]:checked) .quantite { display:none; }

/* Import du carnet */
.import fieldset { margin:0 0 1rem; padding:.8rem; border:2px solid rgba(127,127,127,.35); border-radius:.9rem; min-width:0; }
.import legend { font-weight:700; padding:0 .4rem; }
.import select { max-width:100%; }
.import p { overflow-wrap:anywhere; margin:.2rem 0 .6rem; }

/* Utilisateurs (application en ligne) */
.code-personnel { font:700 clamp(1.4rem, 7vw, 2rem)/1.3 monospace; letter-spacing:.04em; }
.utilisateur { border-top:1px solid var(--trait); padding:.3rem 0 .6rem; }
.utilisateur summary { cursor:pointer; min-height:2.9rem; padding-top:.7rem; }
