/* Audit « respect des maquettes » (28/11/2026), lot 4 : la page Rentabilité comme les maquettes V226
   (« Rentabilité d'un chantier » à l'ordinateur, « Mon chantier sur iPhone » au téléphone).
   Surcharge les styles .renta-* de barre.css ; chargée après lui. Les pages du bureau restent claires (§295.2). */

/* L'en-tête : une ligne discrète, plus de paragraphes d'explication */
#rentabilite-liste .renta-tete-ligne { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin: 0 0 12px; font-size: 14px; color: #55657a; }
#rentabilite-liste .renta-tete-ligne .renta-actualiser { min-height: 40px; }
.renta-legende-bas { margin: 18px 0 0; font-size: 13px; color: #6b7686; line-height: 1.5; }

/* L'état vide : une carte, une phrase */
.renta-vide { display: grid; justify-items: center; gap: 6px; margin-top: 8px; padding: 32px 20px; border-radius: 22px; background: #ffffff; border: 1px solid #ece6de; text-align: center; }
.renta-vide .empty-icon { width: 44px; height: 44px; margin: 0 0 4px; border-radius: 22px; background: #e8f0fb; color: #1f4e79; font-size: 20px; font-weight: 800; }
.renta-vide p { margin: 0; max-width: 440px; }

/* Les chantiers sans chiffre : un nombre, la liste repliée */
.renta-sans-liste { margin-top: 16px; border-radius: 18px; background: #ffffff; border: 1px solid #ece6de; }
.renta-sans-liste summary { min-height: 48px; display: flex; align-items: center; padding: 0 18px; cursor: pointer; font-weight: 600; color: #0f2a47; list-style: none; }
.renta-sans-liste summary::-webkit-details-marker { display: none; }
.renta-sans-liste summary::after { content: "›"; margin-left: auto; font-size: 20px; color: #6b7686; transition: transform .15s ease; }
.renta-sans-liste[open] summary::after { transform: rotate(90deg); }
.renta-sans-liste ul { list-style: none; margin: 0; padding: 0 18px 12px; display: grid; gap: 0; max-height: 340px; overflow-y: auto; }
.renta-sans-liste li { display: grid; gap: 2px; padding: 10px 0; border-top: 1px solid #f0ebe4; min-width: 0; }
.renta-sans-liste li strong { font-size: 15px; color: #0f2a47; overflow-wrap: anywhere; }
.renta-sans-liste li small { font-size: 13px; color: #6b7686; }

/* Les cartes de la liste */
.renta-carte .renta-alerte { justify-self: start; color: #8a4b12; font-size: 13px; }
.renta-carte-chiffres .renta-depasse, .renta-tuile.renta-depasse strong { color: #a8281f; }

/* La vue d'un chantier */
.renta-chantier-tete { display: grid; gap: 2px; }
.renta-chantier-tete .eyebrow { font-size: 12px; letter-spacing: .06em; color: #6b7686; }
.renta-chantier-tete h3 { font-size: 34px; line-height: 1.15; overflow-wrap: anywhere; }
.renta-chantier-tete .muted { margin: 2px 0 0; }
.renta-alertes-bloc { display: grid; gap: 10px; }
.renta-alerte-bloc .renta-alerte { display: inline; padding: 0; border-radius: 0; background: none; color: #0f2a47; font-size: 15px; }
.renta-lots-legende { margin: 0; font-size: 13px; color: #55657a; }
.renta-hors { margin: 0; font-size: 13px; color: #55657a; }
.renta-lot2 small { overflow-wrap: anywhere; }
.renta-jours-court { display: none; }
.renta-barre-paire { display: flex; align-items: flex-end; justify-content: center; gap: 4px; width: 100%; }
.renta-barre-paire .renta-barre-engage { width: 40%; }
.renta-barre-facture { width: 40%; min-width: 14px; border-radius: 8px 8px 0 0; background: #9cc3ea; }

/* Un chantier du conducteur sans chiffre : l'en-tête, une ligne, puis « Sur place aujourd'hui » */
.renta-chantier-vide { margin-top: 8px; }
.renta-chantier-vide + .renta-chantier-vide { margin-top: 26px; padding-top: 22px; border-top: 1px solid #e6e0d8; }
.renta-chantier-vide .renta-chantier-tete h3 { font-size: 26px; }
.renta-pas-encore { margin: 0; font-size: 14px; color: #55657a; }

/* « Sur place aujourd'hui » dans la page : la carte du pointage se fond dans son bloc, comme la maquette */
.renta-bloc .pointage-dans-page { margin: 0; padding: 0; border: 0; background: transparent; }
.renta-bloc .pointage-dans-page.pointage-a-faire { background: transparent; }
.renta-bloc-pointage .renta-bloc-tete { align-items: center; margin-bottom: 10px; }
.renta-bloc-pointage .renta-bloc-tete .status.pending { background: #fde2cf; color: #8a3b12; }

/* Au téléphone : l'ordre de la maquette iPhone — l'alerte, les lots, « Sur place aujourd'hui », puis les chiffres en petit (décision d'Eduardo, 28/11/2026) */
@media (max-width: 700px) {
  .renta-chantier { display: flex; flex-direction: column; gap: 14px; }
  .renta-chantier > .renta-retour { order: 0; align-self: flex-start; }
  .renta-chantier > .renta-chantier-tete { order: 1; }
  .renta-chantier > .renta-alertes-bloc { order: 2; }
  .renta-chantier > .renta-bloc-lots { order: 3; }
  .renta-chantier > .renta-pas-encore { order: 3; }
  .renta-chantier > .renta-bloc-pointage { order: 4; }
  .renta-chantier > .renta-tuiles { order: 5; }
  .renta-chantier > .renta-bloc-graphe { order: 6; }
  .renta-chantier-tete h3, .renta-chantier-vide .renta-chantier-tete h3 { font-size: 24px; }
  .renta-alerte-bloc { padding: 12px 14px; border-radius: 16px; }
  .renta-alerte-bloc p { font-size: 15px; flex-basis: 200px; }
  .renta-bloc { padding: 14px; border-radius: 20px; gap: 10px; }
  .renta-bloc-tete h4 { font-size: 17px; }
  .renta-lots2 { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .renta-lot2 { padding: 6px 2px; background: transparent; }
  .renta-lot2.renta-vert, .renta-lot2.renta-orange, .renta-lot2.renta-rouge { background: transparent; }
  .renta-lot2 .renta-anneau-double { width: 92px; height: 92px; }
  .renta-lot2 strong { font-size: 14px; }
  .renta-lot2 small { font-size: 12px; }
  /* V235 : sous l'anneau, une seule ligne courte (« 57 % jours · reste 3 j »), comme la maquette ; vendu et engagé sont dans les chiffres plus bas */
  .renta-lot2 > small:not(.renta-jours-court) { display: none; }
  .renta-lot2 > .renta-jours-court { display: block; color: #55657a; }
  .renta-lot2 > .renta-jours-court.renta-j-ok { color: #1d6b43; }
  .renta-lot2 > .renta-jours-court.renta-j-orange { color: #8a4b12; }
  .renta-lot2 > .renta-jours-court.renta-j-rouge { color: #a8281f; }
  /* V235 : sans les deux phrases d'explication du haut (maquette V226) — elles restent à l'ordinateur */
  #rentabilite-view .page-heading .muted, #rentabilite-liste [data-renta-non-relie] { display: none; }
  /* les chiffres, en petit, sous le pointage */
  .renta-tuiles { gap: 8px; }
  .renta-tuile { padding: 10px 12px; border-radius: 16px; gap: 3px; }
  .renta-tuile > span, .renta-tuile small { font-size: 12px; }
  .renta-tuile strong { font-size: 17px; }
  .renta-legende-bas { font-size: 12px; }
}
/* V233 (§425) : les journées du lot — orange à 50 %, rouge à 70 % (V224) ; le texte garde le contraste sur le fond pastel du lot */
.renta-journees.renta-j-orange { color: #8a4b12; font-weight: 700; }
.renta-journees.renta-j-rouge { color: #a8281f; font-weight: 700; }

/* V239 (§430) : « Mon chantier » en grand dans la page Chantiers du conducteur, au téléphone (maquette V226). */
@media (max-width: 700px) {
  #sites-view.sites-mon-chantier .page-heading .muted { display: none; }
  #sites-view.sites-peu .sites-toolbar, #sites-view.sites-peu #sites-filters { display: none; }
  #sites-view.sites-mon-chantier #sites-list { display: grid; gap: 18px; }
  .mon-chantier { display: grid; gap: 12px; }
  .mon-chantier-fiche { width: 100%; min-height: 48px; font-size: 16px; }
}
