/* Lot B de l'audit UX du 08/11/2026 : le dépôt d'une annonce par un particulier (étapes, erreurs près du champ, prix annoncé, jauge des photos),
   l'espace vide, les tableaux lisibles sur téléphone, la journée de visite. Chargé après app.css ou plateforme.css ; les variables viennent de l'un ou l'autre. */

/* Progression du dépôt */
.etapes { margin: 0 0 1.25rem; }
.etapes-titre { margin: 0 0 .5rem; font-weight: 700; }
.etapes ol { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0; padding: 0; list-style: none; }
.etapes li { flex: 1 1 9rem; min-width: 0; border: 1px solid var(--line, #E2E6E2); border-radius: 8px; background: #fff; }
.etapes li a, .etapes li > span { display: flex; align-items: center; gap: .55rem; padding: .65rem .8rem; color: inherit; text-decoration: none; font-weight: 600; min-height: 44px; }
.etapes .num, .etape h2 .num, .acc-entete .num { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 1.7rem; height: 1.7rem; border-radius: 50%; background: var(--sand, #ECEBE2); color: var(--ink, #25243F); font: 700 .9rem/1 inherit; }
.etapes li.en-cours { border-color: var(--ink, #25243F); box-shadow: inset 0 -3px 0 var(--lime, #7FDAD3); }
.etapes li.en-cours .num { background: var(--ink, #25243F); color: #fff; }
.etapes li.courant { border-color: var(--ink, #25243F); box-shadow: inset 0 -3px 0 var(--lime, #7FDAD3); }
.etapes li.courant .num { background: var(--ink, #25243F); color: #fff; }
.etapes li.fait .num { background: var(--ok, #1d7a4b); color: #fff; }
.etapes li.a-faire { color: var(--muted, #596272); }
.etape h2 { display: flex; align-items: center; gap: .6rem; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.etape, .etapes { scroll-margin-top: 5rem; }

/* L'assistant en étapes (public/depot-etapes.js) : une étape à la fois, Précédent et Suivant ; sans le script, tout s'affiche à la suite et ces boutons restent cachés. */
[data-etape][hidden], .esp [data-etape][hidden], .pas-nav[hidden], .esp .pas-nav[hidden] { display: none; }
.pas-nav { display: flex; flex-wrap: wrap; gap: .6rem; margin: 1.2rem 0 0; }
.pas-nav button, .depot .actions [data-vers] { min-height: 44px; padding: .6rem 1.1rem; }
.pas-nav button.primary { margin-left: auto; }
.depot .actions [data-vers] { margin-right: auto; }
/* Le titre de l'étape reçoit le focus quand elle s'ouvre (lecteurs d'écran) : pas de cadre autour d'un titre qu'on ne saisit pas. */
.etape h2[tabindex="-1"]:focus { outline: none; }

/* L'accordéon du téléphone (le script pose `depot-acc` sur la page sous 700 px) : un titre par étape, l'étape ouverte se déroule juste dessous, les autres restent repliées.
   La progression du haut n'y sert plus, et le titre propre à chaque section non plus (celui de l'accordéon le remplace). */
.acc-entete { display: none; margin: 0 0 .6rem; scroll-margin-top: 5rem; font-size: 1rem; }
.depot-acc .acc-entete { display: block; }
.depot-acc .etapes, .depot-acc .etape > h2 { display: none; }
.acc-entete .acc-bouton { display: flex; align-items: center; justify-content: flex-start; gap: .7rem; width: 100%; min-height: 56px; padding: .7rem .9rem; border: 1px solid var(--line, #E2E6E2); border-radius: 12px; background: #fff; color: inherit; font: inherit; font-weight: 700; text-align: left; cursor: pointer; }
.acc-entete .acc-bouton:disabled { color: var(--muted, #596272); font-weight: 600; cursor: default; }
.acc-entete.courant .acc-bouton { border-color: var(--ink, #25243F); box-shadow: inset 0 -3px 0 var(--lime, #7FDAD3); }
.acc-entete.courant .num { background: var(--ink, #25243F); color: #fff; }
.acc-entete.fait .num, .acc-entete.fait.courant .num { background: var(--ok, #1d7a4b); color: #fff; }
.acc-fleche { flex: none; margin: 0 .2rem 0 auto; width: .55rem; height: .55rem; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg); }
.acc-entete.courant .acc-fleche { transform: rotate(45deg); }
.acc-bouton:disabled .acc-fleche { display: none; }

/* Formulaire : sections, erreur près du champ, aides repliables */
.depot .actions { display: flex; flex-wrap: wrap; gap: .6rem; margin: 0 0 1.5rem; }
.depot .actions button { min-height: 44px; padding: .6rem 1.1rem; }
.depot label.invalide input, .depot label.invalide select, .depot label.invalide textarea { border-color: var(--warn, #b4372f); outline: 2px solid var(--warn, #b4372f); outline-offset: 0; }
.champ-erreur { display: block; margin-top: .3rem; color: var(--warn, #b4372f); font-weight: 600; font-size: .92rem; }
details.idees, details.options { margin: .6rem 0 0; }
details.idees summary, details.options summary { cursor: pointer; font-weight: 600; min-height: 32px; }
details.options { border-top: 1px solid var(--line, #E2E6E2); padding-top: .6rem; }
.info-publication { border-left: 4px solid var(--lime, #7FDAD3); }
.info-publication h2 { margin-bottom: .5rem; }
button.copier { margin: 0 0 .8rem; min-height: 40px; }

/* Photos : jauge « x sur 20 » */
.jauge-photos { margin: 0 0 .8rem; }
.jauge-photos p { margin: 0 0 .3rem; }
.jauge-photos progress { display: block; width: 100%; height: 14px; accent-color: var(--ok, #1d7a4b); }
#depot-etat:empty { display: none; }
#f-photos { max-width: 100%; }
#depot-photos input[type=file] { min-height: 44px; }
#depot-photos button { min-height: 44px; }

/* Espace vide : un seul geste, gros et clair */
.card.vide { text-align: center; padding: 2rem 1rem; }
.card.vide .gros, a.button.gros { display: inline-block; padding: .9rem 1.8rem; font-size: 1.15rem; min-height: 52px; }

/* Journée de visite : champs privés groupés, libellés espacés */
form.visite label { display: block; margin-top: .7rem; }
form.visite fieldset { margin: 1rem 0 0; }
form.visite fieldset label:first-of-type { margin-top: .3rem; }

/* Tableaux en cartes sous 600 px : Mes annonces, Relevés, Offres reçues, Relevé de clôture */
@media (max-width: 600px) {
  table.cartes.list, table.cartes.list tbody, table.cartes.list tr, table.cartes.list td { display: block; width: 100%; }
  table.cartes.list { border: 0; background: transparent; }
  table.cartes.list thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  table.cartes.list tr { display: flex; flex-direction: column; margin: 0 0 .8rem; padding: .4rem .2rem; border: 1px solid var(--line, #E2E6E2); border-radius: 8px; background: #fff; }
  table.cartes.list td { display: flex; justify-content: space-between; gap: 1rem; padding: .35rem .8rem; border: 0; white-space: normal; text-align: right; overflow-wrap: anywhere; }
  table.cartes.list td::before { content: attr(data-label); flex: none; max-width: 45%; color: var(--muted, #596272); font-weight: 600; text-align: left; }
  table.cartes.list td:not([data-label])::before { content: none; }
  table.cartes.list td:not([data-label]) { justify-content: flex-end; }
  table.cartes.list td[data-label="Rang"] { order: -3; }
  table.cartes.list td[data-label="Nom"] { order: -2; font-weight: 700; }
  table.cartes.list td[data-label="Meilleure offre"] { order: -1; }
  .esp table.cartes.list td { white-space: normal; }
  .scroll:has(table.cartes) { overflow-x: visible; }
}
