/* Répertoire des produits : ce qui est propre au site, par-dessus /atmosphare.css (skill atmosphare-visuel).
   Jetons seulement : aucune couleur littérale hors de atmosphare.css. */

/* ---------------------------------------------------------------- coquille : haut fixe, le corps de la section défile */
#corps { display: flex; flex-direction: column; overflow: hidden; }
#corps > section:not([hidden]) { flex: 1; min-height: 0; display: flex; flex-direction: column; }
#connexion { overflow: auto; padding: 0 16px 32px; }
.a-page-tete { flex: none; }
.a-page-corps { flex: 1; min-height: 0; overflow: auto; }
.qui { font-size: 14px; color: var(--blanc); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.role { background: var(--jaune); color: var(--encre); font-size: 12px; font-weight: 700; padding: 2px 8px; white-space: nowrap; }
/* Sous 1024 px, l'en-tête ne garde que les icônes (libellés en infobulle et pour les lecteurs d'écran) */
@media (max-width: 1023px) {
  .qui, .a-entete .a-lien-clair span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .a-entete .a-lien-clair { width: 44px; justify-content: center; padding: 0; }
  .a-entete .a-lien-clair i { font-size: 22px; }
}
/* Sous 640 px, le haut de page prendrait la moitié de l'écran : il défile avec la liste (le tableau garde son cadre) */
@media (max-width: 639px) {
  #corps > section:not([hidden]) { overflow: auto; }
  #corps > section:not([hidden]) > .a-page-corps { flex: none; overflow: visible; }
  .a-page-tete-ligne { margin-bottom: 8px; }
}
.soustitre { margin: 0 0 12px; }
.choix-principal { flex: 1 1 180px; max-width: 280px; }
.puces { display: contents; }

/* Filtres à choix multiple : une liste à cocher qui se déplie sous le champ */
.libelle-filtre { font-size: 13px; font-weight: 700; }
.choix-principal .libelle-filtre { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
details.multi { position: relative; min-width: 0; }
details.multi > summary { list-style: none; min-height: 42px; padding: 0 36px 0 12px; border: 1px solid var(--bordure-champ); background: var(--blanc);
  font: 300 16px var(--police); color: var(--encre); display: flex; align-items: center; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; position: relative; }
details.multi > summary::-webkit-details-marker { display: none; }
details.multi > summary::after { content: ""; position: absolute; right: 14px; top: 50%; width: 7px; height: 7px; border-right: 1.5px solid var(--encre); border-bottom: 1.5px solid var(--encre); transform: translateY(-70%) rotate(45deg); }
details.multi[open] > summary { border-color: var(--encre); box-shadow: inset 0 0 0 1px var(--encre); }
details.multi[open] > summary::after { transform: translateY(-20%) rotate(-135deg); }
details.multi.actif > summary { font-weight: 700; box-shadow: inset 5px 0 0 var(--jaune); }
.multi-resume { overflow: hidden; text-overflow: ellipsis; }
.multi-liste { border: 1px solid var(--encre); border-top: 0; background: var(--blanc); max-height: 280px; overflow: auto; padding: 4px 12px; }
.multi-liste .a-case { display: flex; min-height: 36px; white-space: normal; font-size: 14px; }
.multi-liste .a-case:hover { background: var(--survol); }
.choix-principal details.multi .multi-liste, #pfiltres > .a-champ details.multi .multi-liste { position: absolute; left: 0; top: 100%; z-index: 30; min-width: 100%; width: max-content; max-width: min(420px, 90vw); }
.filtres-colonnes { grid-column: 1 / -1; border-top: 1px solid var(--filet); padding-top: 4px; }
.filtres-colonnes > summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; font-size: 14px; font-weight: 700; }
.filtres-colonnes > summary:hover { background: var(--survol); }
.actions-filtres { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; justify-content: flex-end; border-top: 1px solid var(--filet); padding-top: 12px; }
#fattente { font-weight: 700; color: var(--encre); border-left: 4px solid var(--action); padding-left: 8px; }
.grille-colonnes { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); gap: 12px 16px; align-items: start; max-height: min(42dvh, 440px); overflow: auto; padding: 4px 2px 8px; }
#plus { display: flex; margin: 16px auto 0; }

/* ---------------------------------------------------------------- connexion */
.boite-connexion { max-width: 400px; margin: 48px auto 12px; padding: 24px; display: flex; flex-direction: column; gap: 14px; }
.boite-connexion h1 { margin: 0 0 4px; font-size: 24px; font-weight: 400; }
#cmessage { text-align: center; color: var(--texte-2); font-size: 14px; max-width: 520px; margin: 8px auto; }
#cmessage.erreur { color: var(--encre); font-weight: 700; border-left: 4px solid var(--probleme); background: var(--probleme-t); padding: 8px 12px; text-align: left; }

/* ---------------------------------------------------------------- boutons du code existant (classes historiques) */
.principal, .accepter { min-height: 42px; padding: 0 20px; border: 0; background: var(--encre); color: var(--blanc); font-size: 14px; font-weight: 700; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  clip-path: polygon(var(--biseau-m) 0, 100% 0, 100% calc(100% - var(--biseau-m)), calc(100% - var(--biseau-m)) 100%, 0 100%, 0 var(--biseau-m)); }
.principal:hover, .accepter:hover { background: #000; }
.principal:focus-visible, .accepter:focus-visible { outline: 2px solid var(--jaune); outline-offset: -7px; }
.secondaire, .danger, .voir { min-height: 40px; padding: 0 14px; border: 1px solid var(--encre); background: var(--blanc); color: var(--encre); font-size: 14px; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.secondaire:hover, .danger:hover, .voir:hover { background: var(--encre); color: var(--blanc); }
.secondaire:focus-visible, .danger:focus-visible, .voir:focus-visible { outline: 2px solid var(--encre); outline-offset: -4px; }
.danger { box-shadow: inset 4px 0 0 var(--probleme); }
.voir { min-height: 32px; font-size: 13px; padding: 0 10px; }
.principal:disabled, .accepter:disabled, .secondaire:disabled, .danger:disabled { opacity: .42; cursor: not-allowed; }
.lien { background: none; border: 0; color: var(--encre); text-decoration: underline; cursor: pointer; font-size: 14px; padding: 0; align-self: flex-start; }
.lien:hover { background: var(--jaune); }
button.code { font: inherit; font-weight: 700; background: none; border: 0; padding: 0; color: var(--encre); cursor: pointer; text-align: left; text-decoration: underline; text-underline-offset: 2px; }
button.code:hover { background: var(--jaune); }
.aide { font-size: 13px; color: var(--texte-2); margin: 6px 0; }
.etat { font-size: 13px; color: var(--texte-2); }
.etat.erreur { color: var(--encre); font-weight: 700; border-left: 4px solid var(--probleme); padding-left: 8px; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 12px; }

/* ---------------------------------------------------------------- résumé, guide des numéros */
#resume { margin: 12px 0; }
.guide { background: var(--blanc); border: 1px solid var(--filet); margin: 0 0 12px; }
.guide > summary { cursor: pointer; min-height: 48px; padding: 0 16px; display: flex; align-items: center; font-size: 15px; font-weight: 700; }
.guide > summary:hover { background: var(--survol); }
.guide-corps { padding: 0 16px 16px; font-size: 14px; }
#vguide details.guide { border: 0; background: none; margin: 0; }
#vguide details.guide > summary { display: none; }
#vguide .guide-corps { padding: 0; font-size: 15px; }
#vguide .guide-corps > p:first-child { background: var(--blanc); border: 1px solid var(--filet); box-shadow: inset 5px 0 0 var(--action); padding: 14px 18px 14px 22px; margin-top: 0; }
.legende .seg { margin-right: 6px; }
.exemples { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); gap: 12px; margin: 12px 0; }
.exemple { border: 1px solid var(--filet); padding: 12px 14px; background: var(--blanc); }
.exemple h4 { margin: 0 0 6px; font-size: 14px; font-weight: 700; }
.numero { font-size: 14px; margin-bottom: 4px; overflow-wrap: anywhere; }
.seg { display: inline-block; font-weight: 700; padding: 1px 6px; font-size: 13px; color: var(--encre); }
.seg.r-fournisseur { background: var(--pastille); }
.seg.r-produit { background: var(--jaune); }
.seg.r-fabricant { background: var(--cours-t); }
.seg.r-variante { background: var(--reussi-t); }
.seg.r-type { background: var(--encre); color: var(--blanc); }
.tiret { color: var(--texte-2); padding: 0 1px; }
.aujourdhui { margin: 2px 0 4px; color: var(--texte-2); font-size: 13px; }
.exemple ul { margin: 4px 0; padding-left: 16px; font-size: 13px; }
.exemple li { margin: 2px 0; }
.table-variantes { border: 1px solid var(--filet); }
.couverture { background: var(--blanc); border-left: 5px solid var(--reussi); padding: 10px 14px; }
.visuels { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 12px; margin: 12px 0; }
.visuels img { width: 100%; height: auto; display: block; border: 1px solid var(--filet); background: var(--blanc); }
.visuels a:hover { background: none; }
.visuels a:hover img { outline: 2px solid var(--encre); }

/* ---------------------------------------------------------------- vue Tableau : le cadre défile, l'en-tête colle */
.grille { overflow: auto; max-height: max(320px, calc(100dvh - 150px)); background: var(--blanc); border: 1px solid var(--filet); }
table.liste { border-collapse: separate; border-spacing: 0; width: max-content; min-width: 100%; font-size: 14px; }
.liste th { position: sticky; top: 0; z-index: 2; background: var(--blanc); border-bottom: 2px solid var(--encre); padding: 10px 12px; font-size: 13px; font-weight: 700; text-align: left; white-space: nowrap; cursor: pointer; user-select: none; }
.liste th:hover { background: var(--survol); }
.liste th i { font-size: 14px; vertical-align: -2px; }
.liste td { padding: 8px 12px; border-bottom: 1px solid var(--filet-fort); white-space: nowrap; max-width: 320px; overflow: hidden; text-overflow: ellipsis; vertical-align: top; }
.liste tr:hover td { background: var(--survol); }
.liste th:first-child, .liste td:first-child { position: sticky; left: 0; z-index: 1; background: var(--blanc); border-right: 1px solid var(--filet); }
.liste th:first-child { z-index: 3; }
.liste tr:hover td:first-child { background: var(--survol); }
.liste td.nombre { text-align: right; font-variant-numeric: tabular-nums; }
.liste tr.modifiee td:first-child { box-shadow: inset 5px 0 0 var(--jaune); }
.marque { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 700; margin-left: 6px; padding: 1px 6px; color: var(--encre); background: var(--action-t); border-left: 4px solid var(--action); }
.marque.ok { background: var(--reussi-t); border-left-color: var(--reussi); }

/* ---------------------------------------------------------------- vue Cartes : une carte par famille */
.produit { background: var(--blanc); border: 1px solid var(--filet); margin: 0 0 12px; }
.produit h3 { margin: 0; padding: 14px 16px; font-size: 16px; font-weight: 700; display: flex; gap: 8px 10px; flex-wrap: wrap; align-items: baseline; border-bottom: 1px solid var(--filet); }
.no { background: var(--jaune); color: var(--encre); padding: 1px 8px; font-size: 13px; font-weight: 700; }
.f { color: var(--texte-2); font-weight: 400; font-size: 13px; }
.etiquette { font-size: 12px; font-weight: 700; padding: 2px 8px; background: var(--pastille); color: var(--encre); white-space: nowrap; }
.etiquette.t { background: var(--cours-t); box-shadow: inset 4px 0 0 var(--cours); padding-left: 10px; }
.etiquette.s { background: var(--entree-t); box-shadow: inset 4px 0 0 var(--entree); padding-left: 10px; }
.infos { display: flex; flex-wrap: wrap; gap: 4px 20px; padding: 10px 16px; font-size: 14px; }
.infos span { color: var(--texte-2); }
.puce { display: inline-block; padding: 1px 8px; margin: 2px 3px 2px 0; background: var(--pastille); font-size: 12px; font-weight: 700; color: var(--encre); }
code { font-family: inherit; font-weight: 700; font-size: 13px; }
.docs { padding: 6px 16px 12px; display: flex; flex-wrap: wrap; gap: 6px; }
.docs a, .docs .absent { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 0 10px; border: 1px solid var(--encre); background: var(--blanc); color: var(--encre); text-decoration: none; font-size: 13px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.docs a:hover { background: var(--encre); color: var(--blanc); }
.docs a i, .docs .absent i { font-size: 16px; flex: none; }
.docs .absent { border-style: dashed; border-color: var(--bordure-champ); color: var(--texte-2); cursor: help; }
.langue { background: var(--encre); color: var(--jaune); padding: 0 5px; font-size: 11px; font-weight: 700; }
.docs a:hover .langue { background: var(--jaune); color: var(--encre); }
.garanties { align-items: center; border-top: 1px solid var(--filet); padding-top: 10px; }
.garanties .titre { font-size: 13px; color: var(--texte-2); margin-right: 4px; }
.sansdoc { color: var(--texte-2); font-size: 13px; padding: 4px 16px 12px; }
.produit details { border-top: 1px solid var(--filet); }
.produit details > summary { cursor: pointer; min-height: 44px; padding: 0 16px; display: flex; align-items: center; font-size: 14px; color: var(--encre); }
.produit details > summary:hover { background: var(--survol); }
.tableau { overflow-x: auto; padding: 0 16px 12px; }
table { border-collapse: collapse; width: 100%; font-size: 13px; }
th, td { text-align: left; padding: 6px 10px; border-bottom: 1px solid var(--filet-fort); vertical-align: top; }
th { font-weight: 700; color: var(--encre); border-bottom: 2px solid var(--encre); }
.tout .contenu { padding: 0 16px 14px; }
.tout h4 { margin: 12px 0 6px; font-size: 12px; font-weight: 700; color: var(--encre); text-transform: uppercase; letter-spacing: .04em; }
.champs { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: 6px 16px; font-size: 14px; }
.champs div { min-width: 0; overflow-wrap: anywhere; }
.champs span { display: block; color: var(--texte-2); font-size: 12px; font-weight: 700; }
.champs em, .vides { color: var(--texte-2); font-style: italic; font-weight: 300; }
.vides { font-size: 13px; margin: 6px 0 0; }
table.large { width: max-content; min-width: 100%; }
table.large td { max-width: 280px; overflow-wrap: anywhere; }
.docs.mini { padding: 0; gap: 4px; display: inline-flex; }
.docs.mini a, .docs.mini .absent { min-height: 26px; font-size: 12px; padding: 0 6px; max-width: 240px; }

/* ---------------------------------------------------------------- dialogues : fiche d'article, visionneuse PDF */
#fiche .boite { max-width: 1100px; }
#visionneuse .boite { max-width: 1200px; }
#visionneuse iframe { flex: 1; width: 100%; border: 0; background: var(--encre); }
#vetat { font-size: 13px; color: var(--jaune); white-space: nowrap; }
.a-boite-tete .a-lien-clair { color: var(--blanc); background: none; border: 0; min-height: 44px; padding: 0 10px; font-size: 14px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; text-decoration: none; white-space: nowrap; }
.a-boite-tete .a-lien-clair:hover { color: var(--jaune); background: none; }
.a-boite-tete :focus-visible { outline-color: var(--jaune); }
@media (max-width: 639px) { #vonglet { display: none; } }
.fiche-section { background: var(--blanc); border: 1px solid var(--filet); padding: 16px 20px; margin: 0 0 12px; }
.fiche-section h2, .fiche-section h3 { margin: 0 0 12px; font-size: 16px; font-weight: 700; }
.pdfs h4 { margin: 14px 0 6px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.champs-edit { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: 12px 16px; }
.champs-edit label, .ajout-pdf label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 700; color: var(--encre); min-width: 0; }
.champs-edit input, .champs-edit textarea, .fiche-section textarea, .fiche-section select, .ajout-pdf input:not([type=checkbox]), .decision input, .compte-form input {
  font: 300 16px var(--police); color: var(--encre); min-height: 42px; padding: 0 12px; border: 1px solid var(--bordure-champ); background: var(--blanc); width: 100%; }
.champs-edit textarea, .fiche-section textarea { padding: 10px 12px; min-height: 70px; resize: vertical; line-height: 1.4; }
.ajout-pdf input[type=file] { padding: 8px 12px; }
.champs-edit input:focus, .champs-edit textarea:focus, .fiche-section textarea:focus, .fiche-section select:focus, .ajout-pdf input:focus, .decision input:focus, .compte-form input:focus { border-color: var(--encre); box-shadow: inset 0 0 0 1px var(--encre); outline: none; }
.champs-edit .change { background: var(--selection); box-shadow: inset 5px 0 0 var(--jaune); border-color: var(--encre); }
.champs-edit .lecture { font-size: 15px; font-weight: 400; color: var(--encre); overflow-wrap: anywhere; padding: 2px 0; }
.champs-edit .lecture em { font-weight: 300; color: var(--texte-2); }
.pdfs li { margin: 6px 0; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.pdfs ul { margin: 4px 0 8px; padding-left: 0; list-style: none; }
.pdfs li > a { color: var(--encre); }
.pdfs h4 .a-pastille { margin-left: 6px; text-transform: none; letter-spacing: 0; }
/* Une catégorie par bloc ; une catégorie vide reste visible, plus discrète, avec son bouton « Ajouter » */
.pdfs .categorie { border-top: 1px solid var(--filet); padding: 6px 0 4px; }
.pdfs .categorie h4 { display: flex; align-items: center; gap: 6px; margin: 4px 0; min-height: 36px; }
.pdfs .categorie.vide h4 > span:first-child { color: var(--texte-2); }
.pdfs .categorie.vide .a-pastille { background: var(--fond); color: var(--texte-2); }
.ajouter-cat { margin-left: auto; min-height: 32px; padding: 0 10px; border: 1px solid var(--encre); background: var(--blanc); color: var(--encre);
  font: 400 13px var(--police); text-transform: none; letter-spacing: 0; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.ajouter-cat:hover { background: var(--encre); color: var(--blanc); }
.ajouter-cat:focus-visible { outline: 2px solid var(--encre); outline-offset: -4px; }
.note-doc { display: block; flex-basis: 100%; margin: 2px 0 4px 22px; font-size: 13px; font-style: italic; font-weight: 300; color: var(--texte-2); }
.note-pdf { grid-column: 1 / -1; }
.projet-doc { display: block; flex-basis: 100%; margin: 2px 0 0 22px; font-size: 13px; font-weight: 400; color: var(--encre); }
.champs-realisation { grid-column: 1 / -1; display: grid; grid-template-columns: 2fr 1.5fr 1fr; gap: 12px; }
.champs-realisation[hidden] { display: none !important; }
@media (max-width: 640px) { .champs-realisation { grid-template-columns: 1fr; } }
.note-pdf textarea { min-height: 60px; padding: 8px 12px !important; }
.ajout-pdf { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); gap: 12px 16px; align-items: end; }
.ajout-pdf label > span { display: inline-flex; align-items: center; gap: 8px; font-weight: 400; min-height: 44px; }
.ajout-pdf input[type=checkbox] { width: 20px; height: 20px; accent-color: var(--encre); }
.compte-form { max-width: 440px; }
.compte-form label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 700; margin: 10px 0; }

/* ---------------------------------------------------------------- propositions : barre gauche de la couleur du statut */
.proposition { background: var(--blanc); border: 1px solid var(--filet); box-shadow: inset 5px 0 0 var(--action); padding: 14px 18px 14px 22px; margin: 0 0 12px; }
.proposition.acceptee { box-shadow: inset 5px 0 0 var(--reussi); }
.proposition.refusee { box-shadow: inset 5px 0 0 var(--probleme); }
.proposition h3 { margin: 0 0 8px; font-size: 16px; font-weight: 700; display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; }
.proposition .meta { font-size: 13px; font-weight: 400; color: var(--texte-2); }
.statut { font-size: 12px; font-weight: 700; padding: 2px 8px; color: var(--encre); background: var(--action-t); border-left: 4px solid var(--action); white-space: nowrap; }
.statut.acceptee { background: var(--reussi-t); border-left-color: var(--reussi); }
.statut.refusee { background: var(--probleme-t); border-left-color: var(--probleme); }
.proposition table { margin: 8px 0; }
.proposition td { max-width: 420px; overflow-wrap: anywhere; }
.avant { text-decoration: line-through; color: var(--texte-2); }
.apres { font-weight: 700; }
.decision { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 10px; }
.decision input { flex: 1 1 240px; width: auto; }

/* ---------------------------------------------------------------- utilisateurs */
.identifiants { box-shadow: inset 5px 0 0 var(--reussi); }
.identifiants pre { background: var(--fond); border: 1px dashed var(--encre); padding: 12px 14px; font: 400 14px/1.6 var(--police); white-space: pre-wrap; margin: 8px 0; }
#ulist > h3 { margin: 18px 0 8px; font-size: 16px; font-weight: 700; }
#ulist .tableau { padding: 0; }
table.comptes { background: var(--blanc); border: 1px solid var(--filet); font-size: 14px; }
table.comptes td, table.comptes th { padding: 10px 12px; vertical-align: middle; }
table.comptes select { min-height: 40px; padding: 0 8px; border: 1px solid var(--bordure-champ); background: var(--blanc); font: 300 16px var(--police); }
table.comptes td:last-child { white-space: nowrap; }

/* ---------------------------------------------------------------- message éphémère (outils.js remplace la classe) */
#avis { position: fixed; left: 50%; bottom: max(18px, env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 60; background: var(--encre); color: var(--blanc); padding: 12px 18px; font-size: 14px; border-bottom: 3px solid var(--jaune); max-width: calc(100vw - 32px); }
#avis.erreur { border-bottom-color: var(--probleme); }

/* Onglet « Catalogues complets » (29 oct. 2026) */
#catalogues h2 { display: flex; align-items: center; gap: 8px; font-size: 18px; margin: 20px 0 8px; }
#catalogues td.nombre { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
#catalogues td a { overflow-wrap: anywhere; }
