/* Mezanmi — page d'estimation traiteur.
   Complète style.css ; ne redéfinit aucune variable. */

.estimation__avis {
  margin: 18px 0 0;
  padding: 16px 20px;
  background: var(--blush);
  border-left: 4px solid var(--gold);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  font-size: .96rem;
  line-height: 1.6;
  color: var(--ink-soft);
  max-width: 76ch;
}
.estimation__avis strong { color: var(--ink); }
.estimation__avis a { color: var(--crimson); font-weight: 700; }

/* ───────── Grille principale ───────── */

.estimation {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 34px;
  align-items: start;
}

.estimation__corps { min-width: 0; }

/* ───────── Groupes ───────── */

.estimation__groupe {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 6px 22px 14px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
}

.estimation__cat {
  font-family: var(--sans);
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--crimson);
  margin: 18px 0 6px;
}

/* ───────── Une ligne de tarif ───────── */

.tarif {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}
.tarif:last-child { border-bottom: 0; }

.tarif__texte { min-width: 0; }

.tarif__nom {
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.35;
  color: var(--ink);
}

.tarif__prix {
  font-size: .88rem;
  color: var(--ink-soft);
  margin-top: 3px;
}
.tarif__prix b { color: var(--ink); font-weight: 800; }
.tarif__unite { color: var(--ink-soft); font-size: .84rem; }

.tarif__qtes {
  display: flex;
  gap: 8px;
  align-items: flex-end;
  flex-shrink: 0;
}

.tarif__champ { display: grid; gap: 4px; }
.tarif__champ--large { min-width: 250px; }
.tarif__champ span {
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.tarif__champ input,
.tarif__champ select {
  font: inherit;
  font-size: .95rem;
  width: 92px;
  padding: 9px 11px;
  border: 1.5px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--cream);
  color: var(--ink);
}
.tarif__champ--large select { width: 100%; }
.tarif__champ input:focus,
.tarif__champ select:focus {
  outline: none;
  border-color: var(--crimson);
  box-shadow: 0 0 0 3px rgba(200, 16, 46, .1);
}
.tarif__champ input:not(:placeholder-shown):not([value=""]):valid { background: #fff; }

/* Une ligne qui compte dans le total */
.tarif.actif { background: rgba(217, 162, 74, .06); }
.tarif.actif .tarif__nom { color: var(--crimson); }

.tarif--champ { grid-template-columns: minmax(0, 1fr) auto; }

.estimation__note {
  font-size: .85rem;
  line-height: 1.6;
  color: var(--ink-soft);
  margin: 6px 0 0;
}

/* ───────── Récapitulatif ───────── */

.estimation__recap {
  position: sticky;
  top: 96px;
  background: #fff;
  border: 1px solid var(--line);
  border-top: 4px solid var(--crimson);
  border-radius: var(--r);
  padding: 22px;
  box-shadow: var(--shadow);
}

.estimation__recap h2 {
  font-family: var(--serif);
  font-size: 1.35rem;
  color: var(--crimson);
  margin: 0 0 14px;
}

.estimation__vide {
  font-size: .92rem;
  color: var(--ink-soft);
  line-height: 1.6;
  margin: 0 0 8px;
}

.est-vide { display: none; }

.est-ligne {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 5px 0;
  font-size: .89rem;
  line-height: 1.4;
  color: var(--ink-soft);
  border-bottom: 1px dashed var(--line);
}
.est-ligne:last-of-type { border-bottom: 0; }
.est-ligne__nom { min-width: 0; }
.est-ligne__nom small { color: var(--ink-soft); font-size: .8rem; }
.est-ligne__montant {
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.est-totaux {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 2px solid var(--line);
}

.est-total {
  display: flex;
  justify-content: space-between;
  padding: 4px 0;
  font-size: .92rem;
  color: var(--ink-soft);
}
.est-total b { color: var(--ink); font-variant-numeric: tabular-nums; }

.est-total--grand {
  margin-top: 10px;
  padding-top: 12px;
  border-top: 2px solid var(--gold);
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--crimson);
}
.est-total--grand b { color: var(--crimson); }

.est-total--depot { color: var(--ink); font-weight: 700; }
.est-total--depot b { font-weight: 800; }

.est-par-personne {
  margin-top: 12px;
  padding: 10px 12px;
  background: var(--cream-2);
  border-radius: var(--r-sm);
  font-size: .86rem;
  color: var(--ink-soft);
  text-align: center;
}
.est-par-personne b { color: var(--ink); }

.est-alerte {
  margin-top: 12px;
  padding: 12px 14px;
  background: #FDF0EE;
  border-radius: var(--r-sm);
  font-size: .85rem;
  line-height: 1.5;
  color: #8E0C21;
}

.est-hors-zone {
  margin-top: 12px;
  padding: 12px 14px;
  background: var(--cream-2);
  border-radius: var(--r-sm);
  font-size: .85rem;
  line-height: 1.5;
  color: var(--ink-soft);
}

.estimation__actions {
  display: grid;
  gap: 9px;
  margin-top: 20px;
}

/* Le bouton « copier » confirme visuellement */
#btnCopier.copie { background: #1E7A3C; border-color: #1E7A3C; }

/* Repli quand le presse-papiers est refusé par le navigateur */
.est-resume { margin-top: 14px; }
.est-resume label {
  display: block;
  font-size: .74rem;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 6px;
}
.est-resume textarea {
  width: 100%;
  font-family: var(--sans);
  font-size: .82rem;
  line-height: 1.5;
  padding: 10px 12px;
  border: 1.5px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--cream);
  color: var(--ink);
  resize: vertical;
}

/* ───────── Mobile ───────── */

@media (max-width: 1000px) {
  .estimation { grid-template-columns: 1fr; }
  .estimation__recap { position: static; }
}

@media (max-width: 620px) {
  .estimation__groupe { padding: 4px 16px 10px; }
  .tarif {
    grid-template-columns: 1fr;
    gap: 10px;
    align-items: stretch;
  }
  .tarif__qtes { justify-content: flex-start; }
  .tarif__champ { flex: 1; }
  .tarif__champ input { width: 100%; }
  .tarif__champ--large { min-width: 0; width: 100%; }
}

/* ───────── Impression ───────── */

@media print {
  .header, .topbar, .pied, .estimation__actions, .estimation__avis a,
  .bandeau-cookies, .chatbot, .tiroir, .voile { display: none !important; }
  .estimation { grid-template-columns: 1fr; gap: 0; }
  .estimation__recap {
    position: static;
    box-shadow: none;
    border: 1px solid #999;
    margin-top: 18px;
  }
  .estimation__groupe { box-shadow: none; break-inside: avoid; }
  .tarif__qtes { display: none; }
  .estimation__cat { color: #000; }
}
