/* Lot 57 (demande de Gaël, 7 nov. 2026)
   1. Fiche produit en deux colonnes : « profite de l'espace inutilisé sur les côtés ».
      À gauche la photo et le stock, à droite la réservation, les variantes et les détails.
      Une seule colonne (et la feuille du bas) sous 900 px, comme avant.
   2. Pastille photo sur chaque article (liste) et section photo de la fiche.
   Fonds pleins et texte blanc : lisibles quel que soit le thème. */

/* Lot 58 (demande de Gaël, 7 nov. 2026) : « ça nous force sur certains écrans à descendre la page,
   et il reste de l'espace sur les côtés ». Mesuré à 1526 × 686 : 270 px de trop, bouton Modifier
   caché. Fiche plus large et plus haute, un seul titre (le bandeau), photo à la mesure de l'écran,
   détails en troisième colonne dès 1200 px, boutons du bas toujours visibles. */
.product-sheet-content { position: relative; padding: 1rem 1.25rem; }
/* Le nom figurait deux fois (titre de la fenêtre et bandeau) : le titre reste pour les lecteurs
   d'écran, la croix se pose dans le coin du bandeau, le nom du bandeau passe à la ligne. */
.product-sheet-content > .modal-header {
  position: absolute; top: 0.55rem; right: 0.6rem; z-index: 3;
  margin: 0 !important; padding: 0 !important; border: 0 !important;
}
.product-sheet-content > .modal-header h2 {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap;
}
.product-sheet-content .ps-hero { margin: 0 0 0.8rem; padding: 0.65rem 3.4rem 0.65rem 1rem; }
.product-sheet-content .ps-hero-icon { width: 44px; height: 44px; }
.product-sheet-content .ps-hero-name { white-space: normal; }
/* Fermer / Archiver / Supprimer / Modifier restent en bas de la fenêtre même si elle défile.
   bottom = − marge du bas de la fenêtre (la position collante la respecte). */
.product-sheet-content > .modal-footer {
  position: sticky; bottom: -1rem; z-index: 2;
  margin-top: 0.75rem !important; padding: 0.6rem 0 0.8rem;
  background: rgba(30, 33, 33, 0.97); border-top: 1px solid rgba(119, 124, 124, 0.15);
}
/* Téléphone : le prix passe sous le nom plutôt que de l'écraser ; les quatre boutons sur une
   seule rangée. */
@media (max-width: 600px) {
  .product-sheet-content .ps-hero { flex-wrap: wrap; row-gap: 0.3rem; padding-right: 2.6rem; }
  .product-sheet-content .ps-hero-info { flex: 1 1 11rem; }
  .product-sheet-content .ps-price-badge { margin-left: auto; }
  .product-sheet-content > .modal-footer { gap: 0.35rem; }
  .product-sheet-content > .modal-footer .btn {
    flex: 1 1 0; min-width: 0; min-height: 44px; padding: 0.5rem 0.3rem; font-size: 0.8rem; white-space: nowrap;
  }
  .product-sheet-content > .modal-footer .btn svg { display: none; }
}
@media (min-width: 900px) {
  .product-sheet-content { max-width: min(1560px, 96vw); width: 96vw; max-height: calc(100vh - 2rem); }
  .product-sheet-content .ob-ps-photo-cadre { height: clamp(140px, calc(100vh - 520px), 320px); }
  .product-sheet-content .ob-ps-photo-sans { height: 90px; }
  /* Pas de photo vérifiée mais une image de la fiche : pas de cadre vide en plus de l'image. */
  .product-sheet-content .ob-ps-photo-vide:has(~ .ps-pc-img-wrap) .ob-ps-photo-sans { display: none; }
  .product-sheet-content .ob-ps-photo-vide:has(~ .ps-pc-img-wrap) { margin-bottom: 0.4rem; }
  .product-sheet-content .ps-pc-img { max-height: clamp(120px, calc(100vh - 540px), 210px); }
  .product-sheet-content .ob-ps-photo-msg:empty { min-height: 0; margin: 0; }
  .product-sheet-content .ob-ps-case { padding: 0.4rem; }
  .product-sheet-content .ob-ps-case b { font-size: 1.3rem; }
  .ob-ps-grille {
    display: grid;
    grid-template-columns: minmax(250px, 0.85fr) minmax(0, 1.15fr);
    grid-template-areas: "a b" "a c";
    grid-template-rows: auto 1fr;
    gap: 0.9rem 1.4rem;
    align-items: start;
  }
  .ob-ps-col-a { grid-area: a; }
  .ob-ps-col-b { grid-area: b; }
  .ob-ps-col-c { grid-area: c; }
}
@media (min-width: 1200px) {
  .ob-ps-grille:has(.ob-ps-col-c) {
    grid-template-columns: minmax(260px, 0.9fr) minmax(0, 1.2fr) minmax(0, 1fr);
    grid-template-areas: "a b c";
    grid-template-rows: auto;
  }
  .ob-ps-col-c > .ps-section-sep:first-child { margin-top: 0; padding-top: 0.2rem; }
  /* Fiche PC (pas de troisième colonne) : colonne de gauche plus étroite, ses nombreuses lignes
     sur deux colonnes, chaque intertitre sur toute la largeur. */
  .ob-ps-grille:not(:has(.ob-ps-col-c)) { grid-template-columns: minmax(260px, 0.7fr) minmax(0, 1.3fr); }
  .ob-ps-grille:not(:has(.ob-ps-col-c)) .ob-ps-col-b > .ps-rows {
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 1.4rem;
  }
  .ob-ps-grille:not(:has(.ob-ps-col-c)) .ob-ps-col-b > .ps-rows > .ps-section-sep { grid-column: 1 / -1; }}
.ob-ps-col-a, .ob-ps-col-b, .ob-ps-col-c { min-width: 0; }
.ob-ps-col-b > .ob-ps-resa:first-child { margin-top: 0; }

/* Photo du produit dans la fiche */
.ob-ps-photo { margin: 0 0 0.9rem; }
.ob-ps-photo-cadre {
  display: grid; place-items: center; height: 260px; overflow: hidden;
  /* Lot 58 : piste de taille définie, sinon max-height: 92% de l'image est ignoré et la photo
     est rognée dès que le cadre rapetisse. */
  grid-template: minmax(0, 1fr) / minmax(0, 1fr);
  background: #fff; border-radius: 12px; border: 1px solid rgba(127, 127, 127, 0.25);
}
.ob-ps-photo-cadre img { max-width: 92%; max-height: 92%; object-fit: contain; }
.ob-ps-photo-cadre:focus-visible { outline: 3px solid var(--accent-primary, #32b8c6); outline-offset: 2px; }
.ob-ps-photo-sans {
  height: 120px; font-size: 2.6rem; color: #8a8f90;
  background: rgba(127, 127, 127, 0.08); border: 1px dashed rgba(127, 127, 127, 0.45);
}
.ob-ps-photo-etat { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; margin: 0.5rem 0 0; font-size: 0.85rem; }
.ob-ps-photo-tout { color: var(--accent-primary, #32b8c6); font-size: 0.8rem; }
.ob-ps-photo-actions { display: flex; gap: 0.5rem; margin-top: 0.55rem; }
.ob-ps-photo-actions .btn { flex: 1; min-height: 44px; font-weight: 700; }
.ob-photo-btn-ok { background: #1f7a47; border: 1px solid #1f7a47; color: #fff; }
.ob-photo-btn-non { background: transparent; border: 1px solid #c0392b; color: #e05a4b; }
.ob-ps-photo-msg { min-height: 1em; margin: 0.35rem 0 0; font-size: 0.8rem; color: var(--accent-primary, #32b8c6); }

/* Pastille photo (liste et fiche) */
.ob-photo-pastille {
  display: inline-flex; align-items: center; gap: 0.2rem; margin: 0 0.35rem 0 0;
  padding: 0.05rem 0.45rem; border-radius: 999px; border: 1px solid transparent;
  font-size: 0.72rem; font-weight: 700; line-height: 1.5; white-space: nowrap; color: #fff;
}
.ob-photo-ok { background: #1f7a47; }
.ob-photo-attente { background: #a8590f; }
.ob-photo-refusee { background: #8f2d22; }
.ob-photo-aucune { background: transparent; color: #8a8f90; border-color: rgba(127, 127, 127, 0.45); text-decoration: line-through; }
.ob-pc-pied .ob-photo-pastille { margin-left: 0.4rem; }
