/* Cartes à imprimer : en-tête, schéma et réglages à l'écran (cachés à l'impression par cartes.css).
   Palette, boutons et champs : base.css. */

/* ---------- En-tête et réglages (écran seulement) ---------- */

.entete {
  display: grid;
  gap: 0.8rem;
  max-width: 62rem;
  margin: 0 auto 1rem;
}

/* La page des cartes ne se relie à rien : pas de voyant de liaison. */
#barre .barre-liaison {
  display: none;
}

.entete-texte {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 1.5rem;
}

.titre {
  font-size: 1.9rem;
  font-weight: 700;
  line-height: 1.15;
}

.sous-titre {
  margin: 0.3rem 0 0;
  font-weight: 400;
  color: var(--texte-doux);
}

/* Petit schéma d'une carte : la lettre de chaque bord, tournée vers son bord, le marqueur au centre. */
.schema {
  position: relative;
  flex: none;
  width: 84px;
  height: 84px;
  border-radius: 6px;
  background: #fff;
  color: var(--encre);
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1;
}

.schema > span:not(.schema-marqueur) { position: absolute; left: 50%; top: 50%; }
.schema-a { transform: translate(-50%, -50%) translateY(-34px); }
.schema-b { transform: translate(-50%, -50%) translateX(34px) rotate(90deg); }
.schema-c { transform: translate(-50%, -50%) translateY(34px) rotate(180deg); }
.schema-d { transform: translate(-50%, -50%) translateX(-34px) rotate(-90deg); }

.schema-marqueur {
  position: absolute;
  inset: 22px;
  background: var(--encre);
  box-shadow: inset 0 0 0 6px var(--encre), inset 10px 8px 0 6px #fff;
}

.reglages {
  display: grid;
  gap: 0.8rem;
  max-width: 62rem;
  margin: 0 auto 1.4rem;
  padding: 1rem 1.1rem;
  border: 1px solid var(--bordure);
  border-radius: var(--rayon);
  background: var(--surface);
}

.reglage {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem 0.9rem;
  min-width: 0;
}

.champ-inline {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  min-width: 0;
  max-width: 100%;
  font-weight: 400;
}

.champ-inline input[type='number'] {
  width: 5rem;
  text-align: center;
}

.champ-inline select {
  flex: 1 1 auto;
  width: auto;
  min-width: 0;
  max-width: 30rem;
  text-overflow: ellipsis;
}

.ou {
  font-weight: 400;
  color: var(--texte-doux);
}

.pastille {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 52px;
  padding: 0.2rem 0.2rem 0.2rem 0.85rem;
  border-radius: 999px;
  background: var(--papier);
  color: var(--encre);
  font-weight: 600;
}

.btn-x {
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.08);
  color: var(--encre);
  font: inherit;
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
}

.btn-x:hover {
  background: rgba(0, 0, 0, 0.16);
}

.reglage-imprimer {
  padding-top: 0.8rem;
  border-top: 1px solid var(--bordure);
}

.resume {
  font-weight: 400;
  color: var(--texte-doux);
}

.options-actives {
  padding: 0.1rem 0.65rem;
  border-radius: 999px;
  background: var(--jaune);
  color: var(--encre);
  font-size: 0.85rem;
  font-weight: 600;
}

.reglage-imprimer .btn-principal {
  margin-left: auto;
  padding-inline: 1.5rem;
  font-size: 1.1rem;
}

/* Options avancées et conseils : repliés. */
.replis {
  display: flex;
  flex-wrap: wrap;
  gap: 0 1.5rem;
}

.repli[open] {
  flex-basis: 100%;
}

.repli > summary {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  min-height: var(--cible);
  color: var(--texte);
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}

.repli > summary::-webkit-details-marker { display: none; }

.repli > summary::before {
  content: '';
  width: 0.5rem;
  height: 0.5rem;
  border-right: 2.5px solid currentColor;
  border-bottom: 2.5px solid currentColor;
  transform: rotate(-45deg);
  transition: transform 0.15s;
}

.repli[open] > summary::before { transform: rotate(45deg); }

.repli-corps {
  display: grid;
  gap: 0.2rem;
  margin: 0;
  padding: 0 0 0.6rem;
  font-weight: 400;
}

ul.repli-corps {
  gap: 0.35rem;
  padding-left: 1.3rem;
  color: var(--texte-doux);
}

@media (max-width: 720px) {
  .entete-texte { align-items: flex-start; }
  .schema { display: none; }
  .reglages { padding: 0.9rem; }
  .champ-inline:has(select) { flex-wrap: wrap; width: 100%; }
  .champ-inline select { flex-basis: 100%; }
}

/* Téléphone : l'aperçu A4 est réduit pour tenir dans la largeur (l'impression reste à 100 %). */
@media screen and (max-width: 720px) {
  .pages { zoom: 0.44; }
}
