/* css/estimation.css — page d'estimation de devis (estimation-devis.php)
   Reprend les couleurs et polices du site : rose #ec1b6f, bleu #304779,
   boutons noirs, Nunito Sans (titres/boutons) et Cormorant Garamond (texte). */

.est { max-width: 1100px; }
.est [hidden] { display: none !important; }
.est button { font-family: 'Nunito Sans', sans-serif; }

/* ----- Indicateur d'étapes ----- */
.est-dots { display: flex; gap: 8px 22px; flex-wrap: wrap; list-style: none; margin: 0 0 26px; padding: 0 0 14px; border-bottom: 1px solid #ececec; }
.est-dot { font-family: 'Nunito Sans', sans-serif; font-size: 12px; letter-spacing: 1.5px; text-transform: uppercase; color: #aaa; display: flex; align-items: center; gap: 8px; }
.est-dot span { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border: 1px solid #ccc; border-radius: 50%; font-size: 12px; letter-spacing: 0; }
.est-dot.on { color: #000; }
.est-dot.on span { background: #ec1b6f; border-color: #ec1b6f; color: #fff; }
.est-dot.done { color: #304779; }
.est-dot.done span { border-color: #304779; color: #304779; }

.est-lede { font-size: 19px; color: #666; margin-bottom: 22px; }
.est-title { font-size: 22px; text-transform: uppercase; margin-bottom: 6px; }
.est-hint { color: #777; font-size: 16px; margin: 0 0 14px; }
.est-legal { color: #888; font-size: 15px; font-style: italic; margin: 14px 0 22px; }
.est-error { color: #c0392b; font-size: 16px; margin: 0 0 14px; }

/* ----- Boutons (même style que « Demande de devis ») ----- */
.est-btn { display: inline-block; background: #000; border: 1px solid #000; color: #fff; padding: 12px 26px; margin: 0 8px 8px 0; font-family: 'Nunito Sans', sans-serif; font-size: 12px; font-weight: 500; letter-spacing: 2px; text-transform: uppercase; cursor: pointer; line-height: 1em; border-radius: 0; transition: background .25s, color .25s; }
.est-btn:hover, .est-btn:focus { background: #fff; color: #000; }
.est-btn.alt { background: #fff; color: #000; }
.est-btn.alt:hover, .est-btn.alt:focus { background: #000; color: #fff; }
.est-btn[disabled] { opacity: .35; cursor: not-allowed; }
.est-btn[disabled]:hover { background: #000; color: #fff; }
.est-link { background: none; border: 0; padding: 8px 4px; color: #888; font-size: 13px; text-decoration: underline; cursor: pointer; }
.est-link:hover { color: #ec1b6f; background: none; }

/* ----- Étape 1 ----- */
.est-fields { display: flex; flex-wrap: wrap; gap: 18px; margin-bottom: 8px; }
.est-fields label { display: block; font-family: 'Nunito Sans', sans-serif; font-size: 12px; letter-spacing: 1.5px; text-transform: uppercase; color: #000; flex: 1 1 220px; max-width: 320px; }
.est-fields input { display: block; width: 100%; margin-top: 8px; padding: 12px 14px; border: 1px solid #ececec; font-family: 'Cormorant Garamond', serif; font-size: 22px; font-weight: 500; letter-spacing: 0; color: #000; background: #fff; }
.est-fields input:focus { border-color: #ec1b6f; outline: none; }

/* ----- Étape 2 : recherche, onglets, cartes ----- */
.est-toolbar { margin-bottom: 14px; }
.est-toolbar input { width: 100%; max-width: 520px; padding: 11px 14px; border: 1px solid #ececec; font-size: 18px; background: #fff; }
.est-toolbar input:focus { border-color: #ec1b6f; outline: none; }
.est-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.est-tab { background: #fff; border: 1px solid #d9d9d9; border-radius: 999px; padding: 7px 14px; font-size: 12px; letter-spacing: .5px; text-transform: none; color: #000; cursor: pointer; transition: all .2s; }
.est-tab:hover { border-color: #ec1b6f; color: #ec1b6f; background: #fff; }
.est-tab.on { background: #ec1b6f; border-color: #ec1b6f; color: #fff; }
.est-sub { margin: 22px 0 10px; font-size: 14px; letter-spacing: 2px; text-transform: uppercase; color: #304779; }
.est-empty { color: #888; }
.est-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }

.est-card { position: relative; display: flex; flex-direction: column; text-align: left; padding: 0; border: 2px solid #ececec; background: #fff; cursor: pointer; border-radius: 0; color: #000; letter-spacing: 0; text-transform: none; font-size: inherit; transition: border-color .2s, box-shadow .2s; }
.est-card:hover { border-color: #f3a6c6; background: #fff; color: #000; }
.est-card.on { border-color: #ec1b6f; box-shadow: 0 0 0 3px rgba(236, 27, 111, .14); }
.est-img { display: block; width: 100%; height: 150px; background: #f6f3f0; overflow: hidden; }
.est-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.est-img.empty { display: flex; align-items: center; justify-content: center; color: #d2c9c2; font-size: 34px; }
.est-body { display: block; padding: 10px 12px 12px; flex: 1; }
.est-name { display: block; font-family: 'Nunito Sans', sans-serif; font-weight: 600; font-size: 13px; line-height: 1.35; margin-bottom: 6px; color: #000; }
.est-price { display: block; font-family: 'Nunito Sans', sans-serif; font-weight: 700; font-size: 14px; color: #ec1b6f; }
.est-price.ask { color: #888; font-weight: 400; font-size: 13px; }
.est-rule { display: block; font-size: 14px; color: #888; margin-top: 3px; }
.est-check { position: absolute; top: 8px; right: 8px; width: 26px; height: 26px; border-radius: 50%; background: #fff; border: 1px solid #ccc; color: transparent; font-size: 15px; line-height: 24px; text-align: center; }
.est-card.on .est-check { background: #ec1b6f; border-color: #ec1b6f; color: #fff; }

/* Barre Retour / Voir mon estimation : en haut de l'étape 2, et collée en haut de l'écran
   (à droite du menu latéral) quand on fait défiler le catalogue. */
.est-barwrap { margin-bottom: 16px; }
.est-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 10px 14px; background: #fff; border: 1px solid #ececec; }
.est-bar .est-btn { margin: 0; }
.est-bar.is-fixed { position: fixed; top: 0; left: 23%; right: 0; z-index: 30; border-width: 0 0 1px; box-shadow: 0 6px 18px rgba(0, 0, 0, .08); }
@media screen and (max-width: 1200px) { .est-bar.is-fixed { left: 30%; } }
@media screen and (max-width: 768px) { .est-bar.is-fixed { left: 0; padding-left: 84px; } }
.est-count { font-family: 'Nunito Sans', sans-serif; font-size: 13px; color: #304779; }

/* ----- Étape 3 : récapitulatif ----- */
.est-recap-wrap { overflow-x: auto; margin-bottom: 10px; }
.est-recap { width: 100%; border-collapse: collapse; }
.est-recap, .est-recap tr, .est-recap th, .est-recap td { border: 0; }
.est-recap th { padding: 8px 10px; font-family: 'Nunito Sans', sans-serif; font-size: 11px; letter-spacing: 1.5px; text-transform: uppercase; color: #888; text-align: left; border-bottom: 1px solid #000; white-space: nowrap; }
.est-recap td { padding: 12px 10px; border-bottom: 1px solid #ececec; vertical-align: middle; }
.est-c-img { width: 64px; }
.est-thumb { display: flex; align-items: center; justify-content: center; width: 54px; height: 54px; background: #f6f3f0; overflow: hidden; color: #d2c9c2; font-size: 22px; }
.est-thumb img { width: 100%; height: 100%; object-fit: cover; }
.est-c-name .est-name { font-size: 14px; }
.est-c-unit, .est-c-sub { white-space: nowrap; font-family: 'Nunito Sans', sans-serif; font-size: 14px; }
.est-c-sub { font-weight: 700; text-align: right; }
.est-recap th:nth-child(5) { text-align: right; }
.est-qtybox { display: inline-flex; align-items: stretch; border: 1px solid #d9d9d9; }
.est-qty { width: 64px; border: 0; border-left: 1px solid #d9d9d9; border-right: 1px solid #d9d9d9; text-align: center; padding: 6px 4px; font-family: 'Nunito Sans', sans-serif; font-size: 15px; background: #fff; -moz-appearance: textfield; }
.est-qty::-webkit-outer-spin-button, .est-qty::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.est-qty:focus { outline: 2px solid #ec1b6f; outline-offset: -2px; }
.est-step { width: 32px; border: 0; background: #fff; color: #000; font-size: 18px; cursor: pointer; padding: 0; line-height: 1; }
.est-step:hover { background: #000; color: #fff; }
.est-reset { display: block; background: none; border: 0; padding: 2px 0 0; font-size: 13px; color: #ec1b6f; text-decoration: underline; cursor: pointer; text-transform: none; letter-spacing: 0; }
.est-reset:hover { background: none; color: #304779; }
.est-del { background: none; border: 0; color: #aaa; font-size: 24px; line-height: 1; cursor: pointer; padding: 0 6px; }
.est-del:hover { color: #c0392b; background: none; }
.est-recap tfoot td { border-bottom: 0; padding-top: 18px; }
.est-total-label { font-family: 'Nunito Sans', sans-serif; font-size: 13px; letter-spacing: 2px; text-transform: uppercase; text-align: right; }
.est-total { font-family: 'Nunito Sans', sans-serif; font-size: 22px; font-weight: 800; color: #ec1b6f; white-space: nowrap; text-align: right; }
.est-actions { margin-top: 6px; }

/* ----- Mobile : chaque ligne du récapitulatif devient une carte ----- */
@media (max-width: 700px) {
    .est-recap thead { display: none; }
    .est-recap, .est-recap tbody, .est-recap tfoot, .est-recap tr { display: block; }
    .est-recap tbody tr { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; padding: 12px 0; border-bottom: 1px solid #ececec; }
    .est-recap td { display: block; padding: 0; border: 0; }
    .est-c-img { width: 54px; }
    .est-c-name { flex: 1 1 calc(100% - 120px); padding-right: 30px !important; }
    .est-c-unit::before, .est-c-sub::before { content: attr(data-label) ' : '; color: #888; font-size: 12px; }
    .est-c-unit { flex: 1 1 100%; }
    .est-c-qty { flex: 0 0 auto; }
    .est-c-sub { margin-left: auto; text-align: right; }
    .est-c-del { position: absolute; top: 6px; right: 0; }
    .est-recap tfoot tr { display: flex; justify-content: space-between; align-items: baseline; }
    .est-recap tfoot td { display: block; }
    .est-bar { justify-content: center; }
    .est-bar .est-btn { padding: 11px 14px; }
}

/* ----- Impression : on n'imprime que le récapitulatif ----- */
@media print {
    #pwe-aside, .pwe-nav-toggle, .banner-container, .est-dots, .est-noprint, .est-del, .est-step, .est-reset, #est-step1, #est-step2, .est-bar, .preloader-bg, #preloader { display: none !important; }
    #pwe-main { width: 100% !important; float: none !important; }
    #est-step3 { display: block !important; }
    .est-qty { border: 0; width: auto; }
    .est-qtybox { border: 0; }
}
