/* Déco & Génie — TECNOMAT : palette et composants harmonisés avec gerflor.css. */
/* Déco & Génie — outils Tecnomat, v1.0. Tous les styles sont isolés sous .dg-tecnomat-tool. */
.dg-tecnomat-tool {
  --dg-tmn-accent: #142333;
  --dg-tmn-accent-deep: #294459;
  --dg-tmn-ink: #142333;
  --dg-tmn-muted: #46586a;
  --dg-tmn-line: #d8cfc1;
  --dg-tmn-soft: #f6f0e6;
  --dg-tmn-panel: #fffdf9;
  --dg-tmn-danger: #a5282f;
  box-sizing: border-box;
  max-width: 920px;
  margin: 24px auto;
  padding: clamp(20px, 3.6vw, 38px);
  border: 1px solid var(--dg-tmn-line);
  border-radius: 14px;
  background: var(--dg-tmn-panel);
  box-shadow: none;
  color: var(--dg-tmn-ink);
  font: 16px/1.55 Arial, sans-serif;
  --tm-pad: clamp(20px, 3.6vw, 32px);
  padding: var(--tm-pad);
}
.dg-tecnomat-tool *,
.dg-tecnomat-tool *::before,
.dg-tecnomat-tool *::after { box-sizing: border-box; }
.dg-tecnomat-tool [hidden] { display: none !important; }
.dg-tecnomat-tool__header {
  margin: calc(-1 * var(--tm-pad)) calc(-1 * var(--tm-pad)) 22px;
  padding: var(--tm-pad);
  border-radius: 13px 13px 0 0;
  background: radial-gradient(ellipse at top left, #294459, #142333 75%);
  color: #f8f3ea;
}
.dg-tecnomat-tool__eyebrow {
  display: inline-block;
  margin-bottom: 9px;
  color: #e4c28b;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .055em;
  text-transform: uppercase;
}
.dg-tecnomat-tool h3.dg-tecnomat-tool__title {
  margin: .4rem 0 .6rem !important;
  padding: 0 !important;
  color: #f8f3ea;
  font: 400 clamp(1.55rem, 4vw, 2.3rem)/1.15 Georgia, serif;
}
.dg-tecnomat-tool__intro,
.dg-tecnomat-tool p.dg-tecnomat-tool__intro {
  margin: 0 !important;
  padding: 0 !important;
  color: #f8f3ea;
  font-size: .98rem;
}
.dg-tecnomat-tool__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.dg-tecnomat-tool__field { min-width: 0; }
.dg-tecnomat-tool__field label,
.dg-tecnomat-tool__field > label {
  display: block;
  margin-bottom: 7px;
  color: var(--dg-tmn-ink);
  font-size: .94rem;
  font-weight: 650;
}
.dg-tecnomat-tool__field label span,
.dg-tecnomat-calc__budget-fields legend span { color: var(--dg-tmn-muted); font-weight: 400; }
.dg-tecnomat-tool input[type="text"] {
  display: block;
  width: 100%;
  min-height: 47px;
  margin: 0;
  padding: 11px 13px;
  border: 1px solid #bfcfc9;
  border-radius: 9px;
  outline-offset: 3px;
  background: #fff;
  color: var(--dg-tmn-ink);
  font: inherit;
  font-size: 1rem;
  line-height: 1.3;
  box-shadow: none;
}
.dg-tecnomat-tool input[type="text"]::placeholder { color: #7d8a85; opacity: 1; }
.dg-tecnomat-tool input[type="text"]:focus-visible,
.dg-tecnomat-tool input[type="checkbox"]:focus-visible,
.dg-tecnomat-tool__button:focus-visible {
  outline: 3px solid #8ccdbd;
  outline-offset: 2px;
}
.dg-tecnomat-tool__field small { display: block; margin-top: 6px; color: var(--dg-tmn-muted); font-size: .77rem; }
.dg-tecnomat-calc__margin { margin: 18px 0 0; }
.dg-tecnomat-tool__checkline { display: inline-flex; align-items: flex-start; gap: 10px; cursor: pointer; font-size: .94rem; }
.dg-tecnomat-tool input[type="checkbox"] {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin: 3px 0 0;
  accent-color: var(--dg-tmn-accent);
  cursor: pointer;
}
.dg-tecnomat-calc__margin-field { max-width: 260px; margin: 13px 0 0 28px; }
.dg-tecnomat-calc__budget-fields {
  min-width: 0;
  margin: 24px 0 0;
  padding: 20px 0 0;
  border: 0;
  border-top: 1px solid var(--dg-tmn-line);
}
.dg-tecnomat-calc__budget-fields legend {
  padding: 0 0 10px;
  color: var(--dg-tmn-ink);
  font-size: .97rem;
  font-weight: 700;
}
.dg-tecnomat-tool__error {
  margin: 18px 0 0 !important;
  padding: 10px 12px;
  border-left: 3px solid var(--dg-tmn-danger);
  border-radius: 6px;
  background: #fff3f2;
  color: var(--dg-tmn-danger);
  font-size: .9rem;
}
.dg-tecnomat-calc__results { margin-top: 22px; }
.dg-article .dg-tecnomat-calc__metrics { display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.dg-tecnomat-calc__metric {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  min-height: 110px;
  padding: 17px 19px;
  border: 1px solid var(--dg-tmn-line);
  border-radius: 8px;
  background: #fffdf9;
}
.dg-tecnomat-calc__metric--primary { border-color: #d8cfc1; background: var(--dg-tmn-soft); }
.dg-tecnomat-calc__metric span { color: var(--dg-tmn-muted); font-size: .85rem; }
.dg-tecnomat-calc__metric strong { color: var(--dg-tmn-ink); font-size: clamp(1.25rem, 3.2vw, 1.85rem); font-weight: 800; line-height: 1.2; }
.dg-tecnomat-calc__metric--primary strong { color: var(--dg-tmn-accent-deep); }
.dg-tecnomat-calc__remainder,
.dg-tecnomat-tool p.dg-tecnomat-calc__remainder { margin: 12px 0 0 !important; font-size: .92rem; }
.dg-tecnomat-calc__estimate {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: 8px;
  background: var(--dg-tmn-soft);
}
.dg-tecnomat-calc__estimate span { font-weight: 650; }
.dg-tecnomat-calc__estimate strong { font-size: 1.35rem; color: var(--dg-tmn-accent-deep); }
.dg-tecnomat-calc__hint,
.dg-tecnomat-tool p.dg-tecnomat-calc__hint { margin: 14px 0 0 !important; color: var(--dg-tmn-muted); font-size: .85rem; }
.dg-tecnomat-tool__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 21px; }
.dg-tecnomat-tool__button,
.dg-tecnomat-tool button.dg-tecnomat-tool__button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 7px;
  min-height: 46px;
  margin: 0;
  padding: .55rem .9rem;
  border: 1px solid var(--dg-tmn-ink);
  border-radius: 7px;
  font: 700 16px/1.35 Arial, sans-serif;
  cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease;
}
.dg-tecnomat-tool__button--primary { background: var(--dg-tmn-accent) !important; color: #fff !important; }
.dg-tecnomat-tool__button--primary:hover { background: var(--dg-tmn-accent-deep) !important; }
.dg-tecnomat-tool__button--ghost { border-color: #bfcfc9 !important; background: #fff !important; color: var(--dg-tmn-ink) !important; }
.dg-tecnomat-tool__button--ghost:hover { background: #f3ece1 !important; }
.dg-tecnomat-tool__feedback,
.dg-tecnomat-tool p.dg-tecnomat-tool__feedback { min-height: 1.2em; margin: 8px 0 0 !important; color: var(--dg-tmn-accent-deep); font-size: .85rem; }
.dg-tecnomat-tool__legal,
.dg-tecnomat-tool p.dg-tecnomat-tool__legal { margin: 13px 0 0 !important; color: var(--dg-tmn-muted); font-size: .79rem; line-height: 1.5; }
.dg-tecnomat-check__progressline { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px; font-size: .92rem; }
.dg-tecnomat-check__progressline strong { color: var(--dg-tmn-accent-deep); }
.dg-tecnomat-check__progress {
  display: block;
  width: 100%;
  height: 10px;
  margin: 11px 0 20px;
  overflow: hidden;
  border: 0;
  border-radius: 99px;
  background: #e8dfd0;
  accent-color: var(--dg-tmn-accent);
}
.dg-tecnomat-check__progress::-webkit-progress-bar { background: #e8dfd0; border-radius: 99px; }
.dg-tecnomat-check__progress::-webkit-progress-value { background: var(--dg-tmn-accent); border-radius: 99px; }
.dg-tecnomat-check__progress::-moz-progress-bar { background: var(--dg-tmn-accent); border-radius: 99px; }
.dg-article .dg-tecnomat-check__items { display: grid !important; gap: 9px; }
.dg-article .dg-tecnomat-check__item {
  display: flex !important;
  align-items: flex-start;
  gap: 12px;
  padding: 13px 15px;
  border: 1px solid var(--dg-tmn-line);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  transition: background-color .15s ease;
}
.dg-tecnomat-check__item:hover { background: #fff8ef; }
.dg-tecnomat-check__item:has(input:checked),
.dg-tecnomat-checklist__item--done { border-color: #d8cfc1; background: var(--dg-tmn-soft); }
.dg-tecnomat-check__item input { margin-top: 3px; }
.dg-tecnomat-check__item span { min-width: 0; font-size: .94rem; }
.dg-tecnomat-check__item strong { font-weight: 750; }
.dg-tecnomat-check__complete {
  display: flex;
  align-items: center;
  min-height: 50px;
  margin: 18px 0 0 !important;
  padding: 12px 15px !important;
  border: 1px solid #d8cfc1;
  border-radius: 8px;
  background: var(--dg-tmn-soft);
  color: var(--dg-tmn-accent-deep);
  font-weight: 650;
  font-size: .9rem;
}

@media (max-width: 600px) {
  .dg-tecnomat-tool { margin: 16px auto; border-radius: 14px; }
  .dg-tecnomat-tool__grid,
  .dg-article .dg-tecnomat-calc__metrics {
    grid-template-columns: minmax(0, 1fr);
  }
  .dg-tecnomat-tool__actions { display: flex; flex-direction: column; }
  .dg-tecnomat-tool__button { width: 100%; }
  .dg-tecnomat-calc__margin-field { margin-left: 0; max-width: none; }
}

@media (prefers-reduced-motion: reduce) {
  .dg-tecnomat-tool__button, .dg-tecnomat-check__item { transition: none; }
}

/* Checklist intégrée à l'article Tecnomat (HTML du module Code Divi 5). */
.dg-tecnomat-checklist__progress { margin: 20px 0; font-size: .92rem; }
.dg-tecnomat-checklist__progress > span { display: block; margin-bottom: 8px; color: var(--dg-tmn-accent-deep); font-weight: 700; }
.dg-tecnomat-checklist__progress progress { display: block; width: 100%; height: 10px; overflow: hidden; border: 0; border-radius: 99px; background: #e8dfd0; accent-color: var(--dg-tmn-accent); }
.dg-tecnomat-checklist__progress progress::-webkit-progress-bar { background: #e8dfd0; border-radius: 99px; }
.dg-tecnomat-checklist__progress progress::-webkit-progress-value { background: var(--dg-tmn-accent); border-radius: 99px; }
.dg-tecnomat-checklist__progress progress::-moz-progress-bar { background: var(--dg-tmn-accent); border-radius: 99px; }
.dg-tecnomat-checklist__items { display: grid; gap: 9px; }
.dg-tecnomat-checklist__items > label { display: flex; align-items: flex-start; gap: 12px; padding: 13px 15px; border: 1px solid var(--dg-tmn-line); border-radius: 8px; background: #fff; cursor: pointer; transition: background-color .15s ease; }
.dg-tecnomat-checklist__items > label:hover { background: #fff8ef; }
.dg-tecnomat-checklist__items > label:has(input:checked), .dg-tecnomat-checklist__items > label.dg-tecnomat-checklist__item--done { border-color: #d8cfc1; background: var(--dg-tmn-soft); }
.dg-tecnomat-checklist__items > label > input { flex: 0 0 auto; margin-top: 3px; }
.dg-tecnomat-checklist__items > label > span { min-width: 0; font-size: .94rem; }
.dg-tecnomat-checklist__complete { margin: 18px 0 0; padding: 13px 15px; border: 1px solid #d8cfc1; border-radius: 8px; background: var(--dg-tmn-soft); color: var(--dg-tmn-accent-deep); font-weight: 650; font-size: .9rem; }
.dg-tecnomat-tool h2.dg-tecnomat-tool__title { margin: 0 0 10px !important; padding: 0 !important; color: var(--dg-tmn-ink); font-size: clamp(1.25rem, 2.3vw, 1.8rem); font-weight: 750; line-height: 1.25; }
.dg-tecnomat-tool [hidden] { display: none !important; }
