/* Atelia · console · écran « Retours de l'équipe » (screens/retours-equipe.js).
   Palette : les variables de .nc (css/nouvelle-console.css), posées sur la page (classe nc) et sur le tiroir (conteneur .nc de
   js/nc-kit.js). Les puces de type et de date viennent de js/nc-kit.js. Tout est préfixé re- : rien ne touche les écrans voisins. */

.re { display: flex; flex-direction: column; gap: 12px; min-width: 0; max-width: 100%; }
.re .h-row { margin-bottom: 0; }
.re .re-kb-compteur { font-weight: 600; color: var(--c-encre2); }
.re .re-filtres { min-width: 0; }
.re .re-filtres .n { font-variant-numeric: tabular-nums; opacity: .75; }
.re .re-kb-aide { margin: 0; font-size: 12px; color: var(--c-gris); }
.re-kb-grise { color: var(--c-gris); }
/* Repli sans js/nc-kit.js : une puce simple. */
.re-kb-puce { display: inline-flex; align-items: center; border: 1px solid var(--c-ligne); border-radius: 999px; padding: 1px 8px; font-size: 11.5px; font-weight: 600; color: var(--c-encre2); background: var(--c-carte); white-space: nowrap; }

/* Le tableau : cinq colonnes. La cinquième, « Archivé », repliée (par défaut), ne prend que la largeur de son en-tête et que sa hauteur ;
   dépliée, elle a la largeur des autres. Quand elles ne tiennent pas, c'est le tableau qui défile à l'horizontale, jamais la page.
   max-content, pas auto : quand le tableau défile (de 761 à 1150 px environ), une piste auto tomberait à la largeur d'une lettre (le titre
   se coupe n'importe où) et l'en-tête replié deviendrait une colonne de lettres. */
.re .re-tableau { display: grid; grid-template-columns: repeat(4, minmax(176px, 1fr)) max-content; gap: 12px; align-items: start; min-width: 0; max-width: 100%; overflow-x: auto; padding-bottom: 8px; }
.re .re-tableau.re-archive-ouverte { grid-template-columns: repeat(5, minmax(176px, 1fr)); }
.re .re-colonne { min-width: 0; display: flex; flex-direction: column; gap: 10px; padding: 10px; background: var(--c-zone); border: 1px solid var(--c-ligne); border-radius: 16px; transition: border-color .12s ease, background .12s ease; }
.re .re-colonne.re-survol { border-color: var(--c-bleu); background: var(--c-bleu-doux); }
.re .re-colonne-tete { display: flex; align-items: center; gap: 8px; }
.re .re-colonne-titre { margin: 0; flex: 1 1 auto; min-width: 0; font-size: 13px; font-weight: 800; letter-spacing: 0; color: var(--c-encre); overflow-wrap: anywhere; }
.re .re-kb-compte { display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 22px; padding: 0 7px; border-radius: 11px; background: var(--c-carte); border: 1px solid var(--c-ligne); font-size: 11.5px; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--c-encre2); }
.re .re-liste { display: flex; flex-direction: column; gap: 8px; min-height: 56px; min-width: 0; }
.re .re-colonne-vide { margin: 0; padding: 14px 6px; text-align: center; font-size: 12px; color: var(--c-gris); border: 1px dashed var(--c-ligne); border-radius: 10px; }
.re .re-colonne-vide:empty { display: none; }
/* « Archivé » repliée : sa liste vide reste dans la page (cible du bouton), cachée. Bouton « Déplier » / « Replier » sous son en-tête (la colonne
   repliée reste étroite : la largeur du titre et du nombre), avec sa flèche : vers la droite repliée, vers le bas dépliée. */
.re .re-liste[hidden] { display: none; }
.re .re-plier { justify-content: center; }
.re .re-plier-fleche { display: inline-block; width: 5px; height: 5px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg); }
.re .re-plier[aria-expanded="true"] .re-plier-fleche { transform: translateY(-2px) rotate(45deg); }

/* Une carte = un retour. Elle se glisse (souris) ou s'ouvre (clic, Entrée) ; ses boutons de déplacement sont dans son tiroir. */
.re .re-carte { position: relative; display: flex; flex-direction: column; gap: 6px; min-width: 0; padding: 9px 10px; background: var(--c-carte); border: 1px solid var(--c-ligne); border-radius: 12px; box-shadow: 0 1px 3px rgba(22,36,63,.06); cursor: grab; }
.re .re-carte:hover { border-color: #B9CBEF; }
.re .re-carte:focus-visible { outline: 3px solid var(--c-bleu-bord); outline-offset: 2px; }
.re .re-carte.re-glisse { opacity: .4; }
.re .re-carte.re-envoi { opacity: .65; cursor: progress; }
/* Trait bleu à l'endroit où la carte sera posée (sans rien décaler pendant le glisser). */
.re .re-carte.re-depot-avant::before,
.re .re-carte.re-depot-apres::after { content: ''; position: absolute; left: 0; right: 0; height: 3px; border-radius: 2px; background: var(--c-bleu); pointer-events: none; }
.re .re-carte.re-depot-avant::before { top: -6px; }
.re .re-carte.re-depot-apres::after { bottom: -6px; }
.re .re-carte-tete { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
/* Cinq colonnes : une carte étroite garde sa puce de type dedans (« Demande de fonctionnalité » passe à la ligne au lieu de déborder). */
.re .re-carte-tete > * { max-width: 100%; }
.re .re-carte-tete .nc-st { white-space: normal; line-height: 1.25; border-radius: 10px; }
.re .re-carte-titre { font-size: 13px; font-weight: 800; line-height: 1.3; overflow-wrap: anywhere; }
.re .re-carte-texte { margin: 0; font-size: 12.5px; line-height: 1.4; color: var(--c-encre2); overflow-wrap: anywhere; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3; overflow: hidden; }
.re .re-carte-ctx { font-size: 11.5px; color: var(--c-encre2); overflow-wrap: anywhere; }
.re .re-carte-auteur { font-size: 11.5px; color: var(--c-gris); overflow-wrap: anywhere; }
/* 12/11 (carte 0f3b5c0f) : « Retours des clients » : la franchise du compte qui a laissé le retour, sous son courriel. */
.re .re-carte-franchise { font-size: 11.5px; font-weight: 600; color: var(--c-gris); overflow-wrap: anywhere; }
.re .re-vignette { height: 92px; display: flex; align-items: center; justify-content: center; overflow: hidden; border-radius: 8px; border: 1px solid var(--c-ligne2); background: var(--c-enfonce); font-size: 11px; color: var(--c-gris); text-align: center; }
.re .re-vignette img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top left; -webkit-user-drag: none; }
/* Plusieurs captures (cinq au plus), dans l'ordre : la première en grand, les suivantes en une rangée dessous qui prend toute la
   largeur ; chacune porte son numéro (data-re-rang). Une capture seule garde la vignette d'avant. */
.re .re-vignettes { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; min-width: 0; }
.re .re-vignettes[data-re-nb="2"] { grid-template-columns: minmax(0, 1fr); }
.re .re-vignettes[data-re-nb="3"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.re .re-vignettes[data-re-nb="4"] { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.re .re-vignettes .re-vignette { position: relative; min-width: 0; }
.re .re-vignettes .re-vignette:first-child { grid-column: 1 / -1; }
.re .re-vignettes .re-vignette:not(:first-child) { height: 44px; font-size: 10px; line-height: 1.15; }
.re .re-vignettes .re-vignette::after { content: attr(data-re-rang); position: absolute; top: 3px; left: 3px; min-width: 16px; height: 16px; padding: 0 4px; box-sizing: border-box; border-radius: 8px; background: rgba(22, 36, 63, .78); color: #fff; font-size: 10.5px; font-weight: 800; line-height: 16px; text-align: center; pointer-events: none; }

/* Petit écran : les colonnes gardent une largeur lisible et défilent à l'horizontale dans la zone du tableau. */
@media (max-width: 760px) {
  .re .re-tableau { display: flex; align-items: flex-start; gap: 10px; scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; }
  .re .re-colonne { flex: 0 0 min(280px, 78vw); scroll-snap-align: start; }
  .re .re-colonne.re-repliee { flex: 0 0 auto; }
}

/* Tiroir d'une carte (conteneur .nc de js/nc-kit.js, classe re-fiche ajoutée par l'écran). */
.re-fiche .re-fiche-corps { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.re-fiche .re-fiche-captures { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.re-fiche .re-fiche-capture { margin: 0; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.re-fiche .re-fiche-capture figcaption { font-size: 11.5px; }
.re-fiche .re-fiche-img { display: flex; align-items: center; justify-content: center; min-height: 60px; overflow: hidden; border: 1px solid var(--c-ligne); border-radius: 12px; background: repeating-conic-gradient(#EEF1F5 0% 25%, #FFFFFF 0% 50%) 0 0 / 16px 16px; }
.re-fiche .re-fiche-img img { display: block; max-width: 100%; height: auto; }
.re-fiche .re-fiche-img .re-kb-grise { padding: 20px 10px; font-size: 12.5px; }
.re-fiche .re-fiche-titre { margin: 0 0 6px; font-size: 16px; font-weight: 800; line-height: 1.3; overflow-wrap: anywhere; }
.re-fiche .re-fiche-puces { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.re-fiche .re-fiche-texte { margin: 0; padding: 10px 12px; font-size: 14px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; background: var(--c-zone); border: 1px solid var(--c-ligne); border-radius: 10px; }
.re-fiche .re-fiche-qui { margin: 0; font-size: 12px; overflow-wrap: anywhere; }
.re-fiche .re-fiche-ctx { margin: 0; display: flex; flex-direction: column; border: 1px solid var(--c-ligne); border-radius: 10px; }
.re-fiche .re-fiche-ctx:empty { display: none; }
.re-fiche .re-fiche-ctx-l { display: flex; gap: 10px; padding: 6px 10px; font-size: 12.5px; border-top: 1px solid var(--c-ligne2); }
.re-fiche .re-fiche-ctx-l:first-child { border-top: 0; }
.re-fiche .re-fiche-ctx dt { flex: 0 0 108px; color: var(--c-gris); font-weight: 600; }
.re-fiche .re-fiche-ctx dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.re-fiche .re-fiche-lien { margin: 0; }
.re-fiche .re-fiche-lien a { text-decoration: none; cursor: pointer; }
.re-fiche .re-fiche-bloc { display: flex; flex-direction: column; gap: 6px; }
.re-fiche .re-fiche-ajout-ligne { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-width: 0; }
.re-fiche .re-fiche-ajout-ligne .re-kb-grise { min-width: 0; overflow-wrap: anywhere; }
.re-fiche .re-fiche-deplacer { display: flex; flex-wrap: wrap; gap: 6px; }
.re-fiche .re-fiche-deplacer .re-ici { background: var(--c-vert); border-color: var(--c-vert); color: #fff; opacity: .9; }
.re-fiche .re-fiche-erreur { margin: 0; font-size: 12.5px; font-weight: 600; color: var(--c-rouge-texte); overflow-wrap: anywhere; }
.re-fiche .re-fiche-erreur:empty { display: none; }
.re-fiche .re-fiche-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.re-fiche .re-fiche-champ { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.re-fiche .re-fiche-champ :is(input, select, textarea) { width: 100%; box-sizing: border-box; padding: 8px 10px; border: 1.5px solid #CBD3E0; border-radius: 10px; background: var(--c-carte); color: var(--c-encre); font: inherit; font-size: 14px; }
.re-fiche .re-fiche-champ textarea { min-height: 140px; line-height: 1.45; resize: vertical; }
.re-fiche .re-fiche-champ :is(input, select, textarea):focus { outline: none; border-color: #9DB5E8; box-shadow: 0 0 0 3px var(--c-bleu-doux); }
.re-fiche .re-fiche-champ :is(input, select, textarea):disabled { opacity: .6; }

@media (max-width: 600px) {
  .re-fiche .nc-btn { min-height: 38px; }
  .re-fiche .re-fiche-champ :is(input, select, textarea) { font-size: 16px; }
  .re-fiche .re-fiche-ctx dt { flex-basis: 92px; }
}
