/* Et Zou — styles propres à la boutique (complète style.css). */

/* ---------- Navigation : lien panier ---------- */
.site-nav .nav-panier { display: inline-flex; align-items: center; gap: 6px; }
.compteur {
  display: inline-block;
  min-width: 20px;
  padding: 1px 6px;
  border-radius: 10px;
  background: var(--red-texte);
  color: #FFFFFF;
  font-size: 12px;
  line-height: 18px;
  text-align: center;
}
.compteur[hidden] { display: none; }

/* ---------- Focus visible partout dans la boutique ---------- */
.boutique a:focus-visible,
.boutique button:focus-visible,
.boutique input:focus-visible,
.site-nav a:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 3px;
}

/* ---------- Galerie : prix sous le titre ---------- */
.work a { display: block; color: inherit; }
.work .prix-depuis { display: block; color: var(--ink); font-size: 14px; margin-top: 2px; }

/* ---------- Fiche dessin ---------- */
.fiche { display: grid; gap: 40px; align-items: start; }
.fiche-image img {
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  background: #FFFFFF;
  box-shadow: 0 18px 40px rgba(22, 19, 15, 0.12);
}
.fiche h1 { margin-bottom: 14px; }
.fiche .retour { font-size: 14.5px; color: var(--mute); display: inline-block; margin-bottom: 18px; }
.fiche .retour:hover { color: var(--red-texte); }

.choix { border: 0; padding: 0; margin: 26px 0 0; }
.choix legend { font-size: 18px; font-weight: 500; margin-bottom: 12px; padding: 0; }
.support {
  display: flex;
  align-items: center;
  gap: 14px;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 2px;
  padding: 14px 16px;
  margin-bottom: 8px;
  cursor: pointer;
}
.support:hover { border-color: var(--ink); }
.support:has(input:checked) { border-color: var(--red); box-shadow: inset 0 0 0 1px var(--red); }
.support input { accent-color: var(--red); width: 18px; height: 18px; margin: 0; flex: none; }
.support .nom { flex: 1; color: var(--ink); }
.support .dim { display: block; font-size: 13.5px; color: var(--mute); }
.support .prix { font-weight: 500; color: var(--ink); white-space: nowrap; }
.precision { font-size: 14.5px; color: var(--mute); margin: 10px 0 0; }

.option { display: flex; gap: 10px; align-items: center; margin-top: 16px; font-size: 15.5px; }
.option input { accent-color: var(--red); width: 18px; height: 18px; margin: 0; }

.ajout { display: flex; gap: 14px; align-items: flex-end; flex-wrap: wrap; margin-top: 24px; }
.champ-quantite label { display: block; font-size: 13.5px; color: var(--mute); margin-bottom: 6px; }
.champ-quantite input {
  width: 84px;
  padding: 13px 12px;
  border: 1px solid var(--ink);
  border-radius: 2px;
  font: inherit;
  background: var(--surface);
  color: var(--ink);
}
button.btn, button.btn-ghost { border: 0; cursor: pointer; font-family: inherit; }
button.btn-ghost { border: 1px solid var(--ink); background: transparent; }
button.btn:disabled { background: #CFC7BC; color: #FFFFFF; cursor: not-allowed; }

.annonce { min-height: 26px; margin-top: 16px; font-size: 15.5px; color: var(--ink); }
.annonce a { color: var(--red-texte); text-decoration: underline; text-underline-offset: 2px; }
.note { font-size: 14px; color: var(--mute); margin-top: 22px; }

/* ---------- Panier ---------- */
.panier { display: grid; gap: 36px; align-items: start; }
.lignes { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.ligne {
  display: grid;
  grid-template-columns: 76px 1fr;
  gap: 14px 16px;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 2px;
  padding: 14px;
}
.ligne img { width: 76px; height: auto; border: 1px solid var(--line); }
.ligne .titre { font-weight: 500; color: var(--ink); }
.ligne .titre:hover { color: var(--red-texte); }
.ligne .detail { font-size: 14px; color: var(--mute); margin: 2px 0 0; line-height: 1.5; }
.ligne .actions {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.quantite { display: inline-flex; align-items: center; border: 1px solid var(--ink); border-radius: 2px; }
.quantite button {
  width: 38px;
  height: 38px;
  border: 0;
  background: transparent;
  font-size: 18px;
  cursor: pointer;
  color: var(--ink);
}
.quantite button:hover { color: var(--red-texte); }
.quantite output { min-width: 30px; text-align: center; font-size: 15px; }
.retirer { border: 0; background: none; color: var(--mute); font: inherit; font-size: 14px; text-decoration: underline; cursor: pointer; padding: 6px 0; }
.retirer:hover { color: var(--red-texte); }
.ligne .total-ligne { font-weight: 500; color: var(--ink); }

.recap h2 { font-size: 34px; margin-bottom: 12px; }
.recap dl { margin: 0; }
.recap .rangee {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-size: 15.5px;
}
.recap dt { color: var(--body); }
.recap dd { margin: 0; color: var(--ink); text-align: right; }
.recap .rangee.total { border-bottom: 0; font-size: 19px; font-weight: 500; padding-top: 14px; }
.recap .modes { border: 0; padding: 0; margin: 12px 0 4px; }
.recap .modes legend { font-size: 15px; color: var(--body); margin-bottom: 8px; padding: 0; }
.recap .support { padding: 10px 12px; }
.recap .mention { font-size: 13.5px; color: var(--mute); margin: 10px 0 0; }
.recap .alerte { font-size: 15px; color: var(--ink); background: var(--red-soft); padding: 12px 14px; border-radius: 2px; margin: 12px 0 0; }
.recap .cgv { display: flex; gap: 10px; align-items: flex-start; margin: 18px 0; font-size: 15px; line-height: 1.5; }
.recap .cgv input { accent-color: var(--red); width: 18px; height: 18px; margin: 2px 0 0; flex: none; }
.recap .cgv a { text-decoration: underline; text-underline-offset: 2px; }
.recap #payer { width: 100%; }

.vide { text-align: center; }

@media (min-width: 621px) {
  .fiche { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; }
  .panier { grid-template-columns: minmax(0, 1.6fr) minmax(300px, 1fr); }
  .ligne { grid-template-columns: 96px 1fr auto; align-items: center; }
  .ligne img { width: 96px; }
  .ligne .actions { grid-column: auto; flex-direction: column; align-items: flex-end; }
}

/* ---------- Pages d'information (livraison, CGV…) ---------- */
.infos .section { max-width: 68ch; margin-bottom: 40px; }
.infos .section a:not(.btn) { text-decoration: underline; text-underline-offset: 2px; }
.tableau { width: 100%; border-collapse: collapse; margin: 8px 0 18px; font-size: 15px; }
.tableau caption { text-align: left; color: var(--mute); font-size: 14px; padding-bottom: 8px; }
.tableau th, .tableau td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); color: var(--body); vertical-align: top; }
.tableau th { color: var(--ink); font-weight: 500; }
.tableau-prix td:last-child { white-space: nowrap; color: var(--ink); text-align: right; }
.tableau-prix th:last-child { text-align: right; }

/* ---------- En situation : formats à l'échelle ---------- */
.choix-dessin { margin: 18px 0 26px; display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; }
.choix-dessin label { font-size: 14.5px; color: var(--mute); }
.choix-dessin select { flex: 1 1 220px; min-width: 0;
  font: inherit; font-size: 15px; color: var(--ink);
  background: var(--surface); border: 1px solid var(--ink); border-radius: 2px;
  padding: 10px 12px; max-width: 100%;
}
.choix-dessin select:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }

/* Visionneuse : décor fixe, dessin à sa taille réelle (scenes.js). */
.visionneuse { display: grid; grid-template-columns: minmax(0, 1fr); gap: 22px; }
.formats { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.formats legend { font-size: 14.5px; color: var(--mute); margin-bottom: 8px; padding: 0; width: 100%; }
.format-choix { position: relative; cursor: pointer; }
.format-choix input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.format-choix span {
  display: block;
  border: 1px solid var(--ink);
  border-radius: 2px;
  padding: 8px 12px;
  font-size: 14.5px;
  color: var(--ink);
  background: var(--surface);
  line-height: 1.3;
}
.format-choix small { display: block; font-size: 12px; color: var(--mute); }
.format-choix input:checked + span { background: var(--ink); color: #FFFFFF; }
.format-choix input:checked + span small { color: #E9E4DD; }
.format-choix input:focus-visible + span { outline: 2px solid var(--red); outline-offset: 3px; }
.format-choix:hover span { border-color: var(--red); }

.scene { margin: 0; }
.scene svg {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: #F4EFE7;
}
.scene figcaption {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 12px 20px; margin-top: 14px; font-size: 14.5px; color: var(--body);
}

@media (min-width: 900px) {
  .visionneuse { grid-template-columns: 260px minmax(0, 1fr); align-items: start; gap: 36px; }
  .formats { flex-direction: column; }
  .format-choix span { padding: 10px 14px; }
}

/* ---------- Grille : même cadre pour les dessins carrés et portrait ---------- */
.boutique .work img,
.composer-carte img {
  aspect-ratio: 1231 / 1600;
  object-fit: contain;
  background: #FFFFFF;
}

/* ---------- Carte recto / verso (En situation) ---------- */
.scene .carte { cursor: pointer; }
.scene .carte-retournement { transform-box: fill-box; transform-origin: center; }
.bouton-retourner { padding: 10px 16px; font-size: 14px; }

@media (max-width: 620px) {
  .tableau { font-size: 13.5px; }
  .tableau th, .tableau td { padding: 8px 6px; overflow-wrap: anywhere; }
}
