/* Composants ajoutes au lot 1bis : blocs appareil, photos, accordeons,
   acquittements, apercu d'import. Le socle est dans janus.css. */
/* --- Lot 1bis : un bloc par appareil, statut reversible --- */
details.carte > summary {
  cursor: pointer; display: flex; align-items: center;
  justify-content: space-between; gap: 10px; font-size: 16px;
  min-height: 44px;                 /* cible tactile */
}
details.carte > summary::-webkit-details-marker { display: none; }
details.carte > summary::after {
  content: "▾"; color: #5A6B7F; font-size: 14px;
}
details.carte[open] > summary::after { content: "▴"; }

.ligne-statut {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  margin-top: 12px; padding-top: 12px; border-top: 1px solid #E3E9F0;
}
.ligne-statut select { min-height: 44px; }
.etiquette-champ {
  display: block; font-size: 13px; font-weight: 600; color: #33475B;
  margin: 10px 0 4px;
}
.aide { font-size: 12px; color: #5A6B7F; flex-basis: 100%; }

/* --- Lot 1bis F : ce que le client doit voir avant de signer --- */
details.pliable {
  border: 1px solid #D6DEE8; border-radius: 6px; margin-bottom: 10px;
  background: #FAFBFC;
}
details.pliable > summary {
  cursor: pointer; padding: 12px; min-height: 44px; font-weight: 600;
  display: flex; align-items: center; justify-content: space-between;
}
details.pliable > summary::after { content: "▾"; color: #5A6B7F; }
details.pliable[open] > summary::after { content: "▴"; }
details.pliable > *:not(summary) { padding: 0 12px; }
details.pliable > *:last-child { padding-bottom: 12px; }

table.tarifs-ecran { width: 100%; border-collapse: collapse; font-size: 14px; }
table.tarifs-ecran td { padding: 8px 0; border-bottom: 1px solid #E3E9F0; }
table.tarifs-ecran td.prix {
  text-align: right; white-space: nowrap; font-weight: 600;
}
.clause { margin-bottom: 10px; }
.clause-titre { font-weight: 600; font-size: 14px; color: #1B2733; }
.clause-texte { font-size: 13px; color: #33475B; line-height: 1.5; }

/* La clause de sauvegarde est le litige numero un : elle reste depliee. */
.clause-sauvegarde {
  border: 1px solid #E0B94D; border-left: 4px solid #E0B94D;
  background: #FDF8EC; border-radius: 6px; padding: 12px; margin: 12px 0;
}
.case-acquit {
  display: flex; gap: 10px; align-items: flex-start;
  min-height: 44px; padding: 10px 0; font-size: 14px; line-height: 1.45;
}
.case-sauvegarde { border-top: 1px solid #E3E9F0; }

.info-erreur {
  border-left-color: #C0392B; background: #FDECEA; color: #7B241C;
}

/* --- Lot 1bis D : canaux de contact --- */
fieldset.canaux {
  border: 1px solid #D6DEE8; border-radius: 6px; padding: 10px 12px;
  margin: 12px 0;
}
fieldset.canaux legend {
  font-size: 13px; font-weight: 600; color: #33475B; padding: 0 6px;
}
fieldset.canaux .case { min-height: 44px; }

/* --- Lot 1bis E : blocs appareil et photos --- */
.entete-appareil {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.entete-appareil h2 { margin: 0; }
.bouton-retirer {
  background: none; border: 1px solid #D6DEE8; border-radius: 6px;
  color: #7B241C; font-size: 13px; padding: 10px 12px; min-height: 44px;
  cursor: pointer;
}
.bloc-appareil + .bloc-appareil { border-top: 3px solid #E8F0F9; }
.barre-ajout {
  /* PAS .barre-actions : celle-la est fixee en bas de l'ecran et
     recouvrirait le pave de signature. */
  display: block; margin: 4px 0 20px;
}
.barre-ajout .bouton { width: 100%; }

.galerie-photos {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 10px; margin: 8px 0;
}
.vignette-photo { margin: 0; }
.vignette-photo img {
  width: 100%; aspect-ratio: 1; object-fit: cover;
  border: 1px solid #D6DEE8; border-radius: 6px; background: #FAFBFC;
}
.bouton-vignette {
  width: 100%; margin-top: 4px; min-height: 44px; cursor: pointer;
  background: none; border: 1px solid #D6DEE8; border-radius: 6px;
  color: #7B241C; font-size: 12px;
}
.aide-erreur { color: #7B241C; }

/* Le selecteur de fichier doit rester une cible tactile de 44 px. */
input[type="file"] {
  min-height: 44px; padding: 10px; width: 100%;
  border: 1px solid #D6DEE8; border-radius: 6px; background: #FAFBFC;
}

/* --- Lot 1bis H : apercu d'import --- */
.tableau-defilant { overflow-x: auto; margin: 12px 0; }
table.apercu-import { width: 100%; border-collapse: collapse; font-size: 13px; }
table.apercu-import th, table.apercu-import td {
  padding: 8px 10px; text-align: left; border-bottom: 1px solid #E3E9F0;
  vertical-align: top; white-space: nowrap;
}
table.apercu-import th { background: #F2F7FC; font-size: 12px; }
table.apercu-import tr.etat-doublon { background: #FDF8EC; }
table.apercu-import tr.etat-ignoree { color: #7A8899; }

/* Trois choix exclusifs de sauvegarde : le litige numero un du metier. */
fieldset.choix-sauvegarde {
  border: 1px solid #E0B94D; border-left: 4px solid #E0B94D;
  background: #FDF8EC; border-radius: 6px; padding: 10px 14px; margin: 12px 0;
}
fieldset.choix-sauvegarde legend {
  font-size: 13px; font-weight: 700; color: #7A5B10; padding: 0 6px;
}
fieldset.choix-sauvegarde .case { align-items: flex-start; }
fieldset.choix-sauvegarde input[type="radio"] { margin-top: 3px; }

/* Erreur de saisie : sous le champ, en francais, jamais du JSON. */
.erreur-champ {
  color: #7B241C; font-size: 13px; font-weight: 600; margin: 4px 0 0;
}
.champ:has(.erreur-champ) input,
.champ:has(.erreur-champ) textarea { border-color: #C0392B; }

/* --- Lot 1ter E : indicatif accole au telephone, canaux sur une ligne --- */
.ligne-telephone { display: flex; gap: 8px; align-items: stretch; }
.ligne-telephone select {
  flex: 0 0 auto; width: auto; max-width: 45%; min-height: 44px;
}
.ligne-telephone input { flex: 1 1 auto; min-width: 0; }

.rangee-canaux { display: flex; flex-wrap: wrap; gap: 4px 18px; }
.rangee-canaux .case { flex: 0 0 auto; }
@media (max-width: 560px) {
  /* Empiles seulement en mobile. */
  .rangee-canaux { flex-direction: column; gap: 0; }
  .rangee-canaux .case { width: 100%; }
}

/* --- Lot 1ter G/H/I : en-tete au gabarit des PDF, menu, pied de page --- */
/* Logo blanc pose directement sur le bleu : plus de cartouche blanc. */
.bandeau .marque img {
  height: 26px; width: auto; display: block;
  background: none; border-radius: 0; padding: 0;
}
.titre-bandeau { display: flex; flex-direction: column; line-height: 1.25; }
.slogan-bandeau { color: #C7DBF2; font-size: 12px; }
.outils-bandeau {
  margin-left: auto; display: flex; align-items: center; gap: 8px;
}
.outils-bandeau .badge { margin-left: 0; }

/* Menu Parametres : <details> pur, sans JavaScript. */
.menu-parametres { position: relative; }
.menu-parametres > summary {
  list-style: none; cursor: pointer; color: #fff;
  min-width: 44px; min-height: 44px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 8px;
}
.menu-parametres > summary::-webkit-details-marker { display: none; }
.menu-parametres[open] > summary { background: rgba(255,255,255,0.16); }
.volet-parametres {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 40;
  background: #fff; border: 1px solid #D6DEE8; border-radius: 8px;
  box-shadow: 0 8px 24px rgba(16,32,54,0.18); min-width: 250px; padding: 6px;
}
.volet-parametres a {
  display: block; padding: 12px 14px; min-height: 44px; border-radius: 6px;
  color: #23486E; text-decoration: none; font-size: 15px;
}
.volet-parametres a:hover, .volet-parametres a:focus { background: #EDF2F7; }

.pied { display: flex; flex-direction: column; gap: 4px; }
.pied a { color: inherit; }
.nom-de-code {
  letter-spacing: 1.5px; font-weight: 700; cursor: help;
  border-bottom: 1px dotted currentColor;
}

/* --- Lot 2A : QR d'enrolement, SVG inline --- */
.cadre-qr {
  display: flex; justify-content: center; padding: 16px; margin: 12px 0;
  background: #fff; border: 1px solid #D6DEE8; border-radius: 8px;
}
.cadre-qr svg { width: 100%; max-width: 320px; height: auto; }
