/* StockNShip — guides (articles). S'ajoute à style.css. */

/* ---------- En-tête d'article ---------- */
.guide-tete { padding: 56px 0 64px; border-bottom: 1px solid var(--trait); }
.guide-tete-grille { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 56px; align-items: center; }
.fil { font-size: .88rem; font-weight: 700; color: var(--encre-2); margin-bottom: 22px; }
.fil a { text-decoration: none; }
.fil a:hover { color: var(--orange-fonce); }
.fil span { margin: 0 8px; color: var(--trait); }
.guide-tampon {
  display: inline-block; font-family: var(--titre); font-size: .95rem; letter-spacing: .08em; text-transform: uppercase;
  color: var(--orange-fonce); border: 2px solid currentColor; border-radius: 3px; padding: 4px 10px 3px;
  transform: rotate(-2deg); margin-bottom: 20px;
}
.guide-tete h1 { font-size: clamp(2.5rem, 5.6vw, 4.4rem); }
.guide-tete h1 em { font-style: normal; color: var(--orange); }
.guide-chapeau { font-size: 1.2rem; color: var(--encre-2); margin: 22px 0 26px; max-width: 38rem; }
.guide-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 22px; font-size: .9rem; color: var(--encre-2); }
.guide-auteur { display: inline-flex; align-items: center; gap: 10px; color: var(--encre); font-weight: 700; }
.guide-auteur .pastille {
  width: 36px; height: 36px; border-radius: 50%; background: var(--encre); color: var(--orange);
  display: grid; place-items: center; font-family: var(--titre); font-size: 1rem;
}

/* Bordereau « En bref » */
.bordereau {
  position: relative; background: var(--blanc); border-radius: 4px; padding: 22px 24px 18px;
  box-shadow: 0 1px 0 var(--trait), 0 22px 40px -22px rgba(18, 24, 38, .45);
  transform: rotate(1.4deg);
}
.bordereau::before {
  content: ""; position: absolute; top: -15px; left: 28px; width: 110px; height: 30px;
  transform: rotate(-4deg); background: rgba(201, 155, 95, .82);
  clip-path: polygon(3% 0, 97% 4%, 100% 100%, 0 96%);
}
.bordereau-haut { display: flex; justify-content: space-between; align-items: baseline; border-bottom: 3px solid var(--encre); padding-bottom: 10px; }
.bordereau-haut strong { font-family: var(--titre); font-size: 1.5rem; }
.bordereau-haut span { font-family: var(--mono); font-size: .78rem; color: var(--encre-2); letter-spacing: .08em; }
.bordereau ol { list-style: none; margin: 0; padding: 0; counter-reset: b; }
.bordereau li { counter-increment: b; display: grid; grid-template-columns: 34px 1fr; gap: 8px; padding: 13px 0; border-bottom: 1px dashed var(--trait); font-size: .97rem; }
.bordereau li::before { content: "0" counter(b); font-family: var(--mono); font-weight: 700; color: var(--orange-fonce); }
.bordereau-code { margin-top: 14px; height: 46px; background: repeating-linear-gradient(90deg, var(--encre) 0 2px, transparent 2px 5px, var(--encre) 5px 6px, transparent 6px 9px, var(--encre) 9px 12px, transparent 12px 14px); }
.bordereau-num { font-family: var(--mono); font-size: .8rem; letter-spacing: .16em; text-align: center; margin-top: 6px; color: var(--encre-2); }

/* ---------- Corps ---------- */
.guide-corps { padding: 64px 0 40px; }
.guide-grille { display: grid; grid-template-columns: 230px minmax(0, 700px); gap: 72px; justify-content: center; }
.sommaire { position: sticky; top: 100px; align-self: start; font-size: .92rem; }
.sommaire strong { display: block; font-family: var(--titre); font-size: 1.15rem; margin-bottom: 12px; }
.sommaire ol { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--trait); }
.sommaire a { display: block; padding: 7px 0 7px 16px; margin-left: -2px; border-left: 2px solid transparent; text-decoration: none; color: var(--encre-2); line-height: 1.3; }
.sommaire a:hover { color: var(--encre); }
.sommaire a.actif { color: var(--encre); font-weight: 700; border-left-color: var(--orange); }

.article { font-size: 1.08rem; line-height: 1.7; }
.article > p, .article > ul { color: #2A3142; }
.article h2 { font-size: clamp(1.9rem, 3.6vw, 2.6rem); margin: 72px 0 18px; scroll-margin-top: 90px; }
.article h2:first-child { margin-top: 0; }
.article strong { color: var(--encre); }
.article ul { padding-left: 1.2em; }
.article li { margin-bottom: 8px; }
.lettrine::first-letter { float: left; font-family: var(--titre); font-size: 4.6rem; line-height: .8; margin: 8px 12px 0 0; color: var(--orange); }

/* Les 7 signes : cartes « colis » */
.signes { list-style: none; margin: 32px 0 0; padding: 0; display: grid; gap: 22px; }
.signe { position: relative; background: var(--blanc); border-radius: 4px; padding: 26px 28px 22px 96px; box-shadow: 0 1px 0 var(--trait); scroll-margin-top: 90px; }
.signe-num {
  position: absolute; left: 24px; top: 22px; font-family: var(--titre); font-size: 3.4rem; line-height: 1;
  color: var(--orange); -webkit-text-stroke: 0;
}
.signe-num small { display: block; font-family: var(--mono); font-size: .68rem; letter-spacing: .1em; color: var(--encre-2); margin-top: 4px; text-align: center; }
.signe h3 { font-size: 1.55rem; margin-bottom: 10px; }
.signe p { color: #2A3142; margin-bottom: 14px; }
.signal { display: flex; gap: 10px; align-items: baseline; background: var(--beton); border-radius: 3px; padding: 10px 14px; font-size: .95rem; margin: 0; }
.signal b { font-family: var(--mono); font-size: .74rem; letter-spacing: .1em; text-transform: uppercase; color: var(--orange-fonce); white-space: nowrap; }

/* Auto-diagnostic */
.diagnostic { margin: 48px 0 0; background: var(--encre); color: var(--beton); border-radius: 4px; padding: 34px 32px 30px; }
.diagnostic h3 { font-size: 1.9rem; color: var(--blanc); }
.diagnostic > p { color: #B9BFCB; margin: 8px 0 20px; }
.diag-liste { display: grid; gap: 2px; margin: 0 0 24px; }
.diag-liste label { display: flex; gap: 14px; align-items: center; padding: 12px 4px; border-top: 1px solid #2B3243; cursor: pointer; font-weight: 700; color: var(--blanc); }
.diag-liste input { appearance: none; -webkit-appearance: none; flex: none; width: 24px; height: 24px; border: 2px solid #5A6274; border-radius: 3px; display: grid; place-items: center; margin: 0; cursor: pointer; }
.diag-liste input:checked { background: var(--orange); border-color: var(--orange); }
.diag-liste input:checked::after { content: ""; width: 7px; height: 12px; border: solid var(--encre); border-width: 0 3px 3px 0; transform: rotate(45deg) translate(-1px, -1px); }
.diag-resultat { display: grid; grid-template-columns: auto 1fr; gap: 22px; align-items: center; padding-top: 22px; border-top: 1px solid #3A4152; }
.diag-score { font-family: var(--titre); font-size: 3.6rem; line-height: 1; color: var(--blanc); }
.diag-score small { font-size: 1.3rem; color: #7D8597; }
.diag-verdict strong {
  display: inline-block; font-family: var(--titre); font-size: 1.15rem; letter-spacing: .06em; text-transform: uppercase;
  border: 2px solid currentColor; border-radius: 3px; padding: 3px 10px 2px; transform: rotate(-2deg); margin-bottom: 8px;
}
.diag-verdict p { margin: 0; color: #CDD2DC; }
.diag-verdict[data-niveau="0"] strong { color: #9AA3B5; }
.diag-verdict[data-niveau="1"] strong { color: var(--kraft); }
.diag-verdict[data-niveau="2"] strong { color: var(--orange); }
.diag-verdict .bouton { margin-top: 14px; }

/* Calcul type « ticket » */
.calcul { margin: 28px 0 8px; }
.calcul .ticket { padding: 26px 26px 22px; }
.calcul .lignes .prix { font-size: 1.35rem; }
.calcul .total { display: flex; justify-content: space-between; align-items: baseline; padding-top: 14px; border-top: 3px solid var(--encre); margin-top: 4px; }
.calcul .total span { font-weight: 700; }
.calcul .total b { font-family: var(--titre); font-size: 1.9rem; }
.calcul-duo { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.calcul-duo .ticket-titre h3 { font-size: 1.3rem; }
.calcul-duo .ticket.nous { outline: 3px solid var(--orange); outline-offset: -3px; }
.note { font-size: .9rem; color: var(--encre-2); margin-top: 18px; }

/* Encadré conseil */
.astuce { border-left: 6px solid var(--kraft); background: var(--kraft-clair); border-radius: 3px; padding: 18px 22px; margin: 28px 0; }
.astuce strong { display: block; font-family: var(--titre); font-size: 1.25rem; margin-bottom: 4px; }
.astuce p { margin: 0; color: #3B3428; }

/* Questions à poser */
.questions { list-style: none; padding: 0 !important; margin: 24px 0; counter-reset: q; }
.questions li { counter-increment: q; display: grid; grid-template-columns: 44px 1fr; gap: 6px; padding: 16px 0; border-top: 1px solid var(--trait); margin: 0 !important; }
.questions li::before { content: "Q" counter(q); font-family: var(--mono); font-weight: 700; color: var(--orange-fonce); padding-top: 3px; }
.questions b { display: block; color: var(--encre); }
.questions span { color: var(--encre-2); font-size: 1rem; }

/* Appel final */
.guide-appel { margin: 72px 0 0; background: var(--orange); color: var(--encre); border-radius: 4px; padding: 36px 34px 32px; position: relative; overflow: hidden; }
.guide-appel::after {
  content: "STOCKNSHIP · REIMS · 24 H"; position: absolute; right: -40px; top: 26px; transform: rotate(8deg);
  font-family: var(--mono); font-size: .75rem; letter-spacing: .2em; border: 2px solid rgba(18, 24, 38, .35); color: rgba(18, 24, 38, .45); padding: 4px 50px 4px 12px;
}
.guide-appel h2 { margin: 0 0 10px !important; font-size: clamp(1.9rem, 3.6vw, 2.5rem); max-width: 22ch; }
.guide-appel p { margin: 0 0 20px; max-width: 36rem; font-size: 1.05rem; }
.guide-appel .bouton-principal { background: var(--encre); color: var(--blanc); }
.guide-appel .bouton-principal:hover { background: #2B3243; }
.guide-appel .bouton { margin: 0 10px 10px 0; }

/* À lire ensuite */
.suite { padding: 24px 0 96px; }
.suite h2 { font-size: 1.8rem; margin-bottom: 20px; }
.suite-grille { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.suite a { display: block; background: var(--blanc); border-radius: 4px; padding: 20px 22px; text-decoration: none; box-shadow: 0 1px 0 var(--trait); transition: transform .15s; }
.suite a:hover { transform: translateY(-3px); }
.suite a small { display: block; font-family: var(--mono); font-size: .72rem; letter-spacing: .1em; color: var(--orange-fonce); text-transform: uppercase; margin-bottom: 6px; }
.suite a b { font-family: var(--titre); font-size: 1.25rem; line-height: 1.15; display: block; }

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .guide-grille { grid-template-columns: minmax(0, 700px); }
  .sommaire { display: none; }
}
@media (max-width: 860px) {
  .guide-tete-grille { grid-template-columns: 1fr; gap: 44px; }
  .bordereau { max-width: 460px; }
  .suite-grille { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .guide-tete { padding: 36px 0 48px; }
  .guide-corps { padding-top: 44px; }
  .article { font-size: 1.03rem; }
  .signe { padding: 74px 18px 18px; }
  .signe-num { left: 18px; top: 18px; font-size: 2.8rem; display: flex; align-items: baseline; gap: 8px; }
  .signe-num small { display: inline; margin: 0; }
  .signal { flex-direction: column; gap: 2px; }
  .diagnostic { padding: 26px 18px 22px; }
  .diag-resultat { grid-template-columns: 1fr; gap: 10px; }
  .calcul-duo { grid-template-columns: 1fr; }
  .guide-appel { padding: 28px 20px 24px; }
  .guide-appel::after { display: none; }
  .guide-appel .bouton { width: 100%; margin-right: 0; }
}
@media (prefers-reduced-motion: reduce) { .suite a { transition: none; } }

/* 20 heures libérées */
.heures { display: grid; grid-template-columns: 200px 1fr; gap: 0; background: var(--blanc); border-radius: 4px; box-shadow: 0 1px 0 var(--trait); margin: 26px 0; overflow: hidden; }
.heures-total { background: var(--orange); color: var(--encre); padding: 26px 22px; display: flex; flex-direction: column; justify-content: center; }
.heures-total b { font-family: var(--titre); font-size: 4.2rem; line-height: .9; }
.heures-total span { font-weight: 700; margin-top: 8px; line-height: 1.25; }
.heures-liste { list-style: none; margin: 0 !important; padding: 8px 24px !important; }
.heures-liste li { padding: 12px 0 12px 26px; margin: 0 !important; border-bottom: 1px dashed var(--trait); position: relative; line-height: 1.4; }
.heures-liste li:last-child { border-bottom: 0; }
.heures-liste li::before { content: "→"; position: absolute; left: 0; top: 12px; color: var(--orange-fonce); font-weight: 700; }
.heures-liste b { display: block; color: var(--encre); }
.heures-liste span { font-size: .95rem; color: var(--encre-2); }
.grande-citation { margin: 34px 0; padding: 4px 0 4px 26px; border-left: 6px solid var(--orange); }
.grande-citation p { font-family: var(--titre); font-size: clamp(1.5rem, 3vw, 2rem); line-height: 1.15; color: var(--encre); margin: 0; }

/* Question directe / auteur */
.question-directe, .auteur-fin { display: grid; grid-template-columns: 52px 1fr; gap: 16px; align-items: start; border-radius: 4px; padding: 22px 24px; margin: 32px 0 0; }
.question-directe { background: var(--blanc); border: 2px dashed var(--orange); }
.auteur-fin { background: var(--beton-2); margin-top: 56px; }
.question-directe .pastille, .auteur-fin .pastille { width: 52px; height: 52px; border-radius: 50%; background: var(--encre); color: var(--orange); display: grid; place-items: center; font-family: var(--titre); font-size: 1.4rem; }
.question-directe strong, .auteur-fin strong { display: block; font-family: var(--titre); font-size: 1.35rem; margin-bottom: 4px; }
.question-directe p, .auteur-fin p { margin: 0 0 8px; color: #2A3142; font-size: 1rem; }
.question-liens { margin: 0 !important; font-weight: 700; }
.question-liens a { color: var(--orange-fonce); }
@media (max-width: 560px) {
  .heures { grid-template-columns: 1fr; }
  .heures-total { flex-direction: row; align-items: baseline; gap: 12px; padding: 18px; }
  .heures-total b { font-size: 3rem; }
  .heures-liste { padding: 4px 18px !important; }
  .question-directe, .auteur-fin { grid-template-columns: 1fr; padding: 20px 18px; }
}

/* ===== Animations ===== */
/* Barre de lecture */
.barre-lecture { position: fixed; top: 0; left: 0; right: 0; height: 4px; z-index: 60; pointer-events: none; }
.barre-lecture span { display: block; height: 100%; width: 100%; background: var(--orange); transform-origin: 0 50%; transform: scaleX(0); }

@media (prefers-reduced-motion: no-preference) {
  /* Arrivée de l'en-tête */
  @keyframes monte { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
  @keyframes tampon { 0% { opacity: 0; transform: rotate(-2deg) scale(1.6); } 60% { opacity: 1; transform: rotate(-2deg) scale(.94); } 100% { transform: rotate(-2deg) scale(1); } }
  @keyframes pose { 0% { opacity: 0; transform: translateY(-40px) rotate(-4deg); } 70% { opacity: 1; transform: translateY(4px) rotate(1.8deg); } 100% { transform: rotate(1.4deg); } }
  @keyframes scotch { from { opacity: 0; transform: rotate(-4deg) scaleX(.2); } to { opacity: 1; transform: rotate(-4deg) scaleX(1); } }
  @keyframes code { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
  .guide-tete .fil { animation: monte .6s ease-out both; }
  .guide-tampon { animation: tampon .55s cubic-bezier(.2, .8, .3, 1.2) .15s both; }
  .guide-tete h1 { animation: monte .7s ease-out .25s both; }
  .guide-chapeau { animation: monte .7s ease-out .4s both; }
  .guide-meta { animation: monte .7s ease-out .55s both; }
  .bordereau { animation: pose .9s cubic-bezier(.2, .8, .3, 1) .35s both; }
  .bordereau::before { transform-origin: 0 50%; animation: scotch .4s ease-out 1.15s both; }
  .bordereau li { animation: monte .5s ease-out both; }
  .bordereau li:nth-child(1) { animation-delay: .9s; }
  .bordereau li:nth-child(2) { animation-delay: 1.02s; }
  .bordereau li:nth-child(3) { animation-delay: 1.14s; }
  .bordereau-code { animation: code .8s ease-in-out 1.25s both; }

  /* Apparition au défilement (classes posées par guides.js) */
  .a-venir { opacity: 0; transform: translateY(28px); }
  body .apparait { opacity: 1; transform: none; transition: opacity .7s ease-out, transform .7s cubic-bezier(.2, .8, .3, 1), background-size .9s ease-out .2s; transition-delay: var(--retard, 0s); }
  .signe.apparait .signe-num { animation: tampon .5s cubic-bezier(.2, .8, .3, 1.2) calc(var(--retard, 0s) + .15s) both; }
  .heures.apparait .heures-liste li { animation: monte .5s ease-out both; }
  .heures.apparait .heures-liste li:nth-child(1) { animation-delay: .25s; }
  .heures.apparait .heures-liste li:nth-child(2) { animation-delay: .35s; }
  .heures.apparait .heures-liste li:nth-child(3) { animation-delay: .45s; }
  .heures.apparait .heures-liste li:nth-child(4) { animation-delay: .55s; }
  .heures.apparait .heures-liste li:nth-child(5) { animation-delay: .65s; }
  .grande-citation { border-left: 0; padding-left: 32px; background: linear-gradient(var(--orange), var(--orange)) 0 0 / 6px 0 no-repeat; transition: background-size .9s ease-out .2s; }
  .grande-citation.apparait, .grande-citation:not(.a-venir) { background-size: 6px 100%; }

  /* Survol */
  .signe { transition: box-shadow .25s, transform .25s; }
  .signe:hover { transform: translateY(-3px); box-shadow: 0 1px 0 var(--trait), 0 18px 34px -22px rgba(18, 24, 38, .5); }
  .ticket.nous:hover { transform: translateY(-3px); }
  .ticket { transition: transform .25s; }

  /* Test */
  @keyframes coche { 0% { transform: scale(.6); } 60% { transform: scale(1.18); } 100% { transform: scale(1); } }
  @keyframes bond { 0% { transform: scale(1); } 40% { transform: scale(1.25); } 100% { transform: scale(1); } }
  @keyframes tamponne { 0% { opacity: 0; transform: rotate(-2deg) scale(1.8); } 70% { opacity: 1; transform: rotate(-2deg) scale(.95); } 100% { transform: rotate(-2deg) scale(1); } }
  .diag-liste input { transition: background-color .15s, border-color .15s; }
  .diag-liste input:checked { animation: coche .3s ease-out; }
  .diag-liste label { transition: background-color .2s, padding-left .2s; border-radius: 3px; }
  .diag-liste label:hover { background: rgba(255, 255, 255, .04); padding-left: 10px; }
  .diag-score.bond { animation: bond .35s ease-out; }
  .diag-verdict.change strong { animation: tamponne .45s cubic-bezier(.2, .8, .3, 1.2); }
  .diag-verdict .bouton:not([hidden]) { animation: monte .4s ease-out; }

  /* Bouton WhatsApp : petit rappel */
  @keyframes appel { 0%, 92%, 100% { transform: none; } 94% { transform: rotate(-8deg); } 96% { transform: rotate(8deg); } 98% { transform: rotate(-4deg); } }
  .wa-flottant svg { animation: appel 6s ease-in-out 4s infinite; }
}

/* ===== Page d'accueil des guides ===== */
.bordereau .question-liens { margin-top: 14px !important; }
.liste-guides { padding: 56px 0 96px; }
.carte-guide-grille { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.carte-guide { position: relative; display: flex; flex-direction: column; gap: 10px; background: var(--blanc); border-radius: 4px; padding: 26px 26px 24px; text-decoration: none; box-shadow: 0 1px 0 var(--trait); min-height: 260px; }
.carte-guide.une { background: var(--encre); color: var(--beton); }
.carte-guide.une b { color: var(--blanc); font-size: 1.9rem; }
.carte-guide.bientot { background: transparent; border: 2px dashed var(--trait); box-shadow: none; color: var(--encre-2); }
.carte-num { font-family: var(--titre); font-size: 3rem; line-height: 1; color: var(--orange); }
.carte-guide.bientot .carte-num { color: var(--trait); }
.carte-tag { font-family: var(--mono); font-size: .74rem; letter-spacing: .1em; text-transform: uppercase; color: var(--orange); }
.carte-guide.bientot .carte-tag { color: var(--encre-2); }
.carte-guide b { font-family: var(--titre); font-size: 1.45rem; line-height: 1.1; }
.carte-resume { font-size: .98rem; color: #B9BFCB; }
.carte-guide.bientot .carte-resume { color: var(--encre-2); }
.carte-lire { margin-top: auto; font-weight: 700; color: var(--orange); }
@media (prefers-reduced-motion: no-preference) {
  .carte-guide.une { transition: transform .25s, box-shadow .25s; }
  .carte-guide.une:hover { transform: translateY(-4px); box-shadow: 0 22px 40px -22px rgba(18, 24, 38, .6); }
  .carte-guide.une .carte-lire { transition: letter-spacing .25s; }
  .carte-guide.une:hover .carte-lire { letter-spacing: .03em; }
  .carte-guide { animation: monte .6s ease-out both; }
  .carte-guide:nth-child(1) { animation-delay: .5s; }
  .carte-guide:nth-child(2) { animation-delay: .62s; }
  .carte-guide:nth-child(3) { animation-delay: .74s; }
}
@media (max-width: 900px) { .carte-guide-grille { grid-template-columns: 1fr; } .carte-guide { min-height: 0; } }

/* ===== Thème sombre (guides) ===== */
[data-theme="dark"] .bordereau {
  --encre: #121826; --encre-2: #4A5163; --trait: #CDD1D7; --blanc: #F4F2EE; --orange-fonce: #C9500C;
  color: var(--encre); box-shadow: 0 0 0 1px rgba(0, 0, 0, .3), 0 22px 40px -22px rgba(0, 0, 0, .8);
}
[data-theme="dark"] .diagnostic,
[data-theme="dark"] .carte-guide.une,
[data-theme="dark"] .guide-appel { --encre: #121826; --blanc: #FFFFFF; --beton: #ECEEF0; --orange-fonce: #C9500C; }
[data-theme="dark"] .diagnostic, [data-theme="dark"] .carte-guide.une { box-shadow: 0 0 0 1px #263043; }
[data-theme="dark"] .guide-appel { color: #121826; }
[data-theme="dark"] .heures-total { color: #121826; }
[data-theme="dark"] .pastille, [data-theme="dark"] .guide-auteur .pastille { background: #ECEEF0; color: #C9500C; }
[data-theme="dark"] .astuce p { color: #E6D6BC; }
[data-theme="dark"] .article > p, [data-theme="dark"] .article > ul, [data-theme="dark"] .signe p,
[data-theme="dark"] .question-directe p, [data-theme="dark"] .auteur-fin p { color: #C9CFDA; }
[data-theme="dark"] .signe:hover { box-shadow: 0 0 0 1px var(--trait), 0 18px 34px -22px rgba(0, 0, 0, .9); }
[data-theme="dark"] .question-directe { background: var(--blanc); }

/* ===== Guide n°2 : facture, estimateur, comparatif, frais cachés ===== */
.facture { position: relative; background: var(--blanc); border-radius: 4px; padding: 26px 28px 20px; margin: 26px 0 0; box-shadow: 0 1px 0 var(--trait), 0 22px 40px -26px rgba(18, 24, 38, .35); }
.facture::after { content: ""; position: absolute; left: 0; right: 0; bottom: -8px; height: 8px; background: radial-gradient(circle at 8px 0, transparent 7px, var(--blanc) 7.5px) -8px 0/16px 8px repeat-x; }
.facture-tete { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; border-bottom: 3px solid var(--encre); padding-bottom: 12px; }
.facture-tete strong { display: block; font-family: var(--titre); font-size: 1.7rem; line-height: 1; }
.facture-tete span { font-size: .88rem; color: var(--encre-2); }
.facture-num { font-family: var(--mono); font-size: .78rem !important; letter-spacing: .1em; }
.facture-ligne { border-bottom: 1px dashed var(--trait); }
.facture-ligne summary { list-style: none; cursor: pointer; display: flex; align-items: baseline; gap: 12px; padding: 16px 0; }
.facture-ligne summary::-webkit-details-marker { display: none; }
.facture-ligne summary:hover .fl-quoi { color: var(--orange-fonce); }
.fl-num { font-family: var(--mono); font-weight: 700; font-size: .8rem; color: var(--orange-fonce); flex: none; width: 24px; }
.fl-quoi { font-weight: 700; line-height: 1.3; transition: color .15s; }
.fl-quoi small { display: block; font-weight: 400; font-size: .86rem; color: var(--encre-2); }
.facture-ligne .points-suite { flex: 1; border-bottom: 2px dotted var(--trait); transform: translateY(-5px); min-width: 16px; }
.fl-prix { font-family: var(--titre); font-size: 1.25rem; white-space: nowrap; text-align: right; line-height: 1.15; }
.fl-prix small { display: block; font-family: var(--texte); font-size: .8rem; color: var(--encre-2); font-weight: 400; }
.facture-ligne summary::after { content: "+"; flex: none; align-self: center; width: 20px; height: 20px; line-height: 18px; text-align: center; border: 1.5px solid var(--trait); border-radius: 50%; font-family: var(--texte); font-size: .9rem; color: var(--encre-2); transition: transform .2s; }
.facture-ligne[open] summary::after { transform: rotate(45deg); }
.facture-ligne > p { margin: 0 0 16px 36px; font-size: .98rem; color: var(--encre-2); max-width: 36rem; }
.facture-pied { font-size: .82rem; color: var(--encre-2); margin: 14px 0 0; }

.estimateur { margin: 56px 0 0; background: var(--encre); color: var(--beton); border-radius: 4px; padding: 32px 32px 28px; scroll-margin-top: 90px; }
.estimateur h3 { font-size: 1.9rem; color: var(--blanc); }
.estimateur > p { color: #B9BFCB; margin: 8px 0 22px; }
.est-champs { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 28px; }
.est-champ > span { display: flex; justify-content: space-between; align-items: baseline; font-weight: 700; font-size: .95rem; margin-bottom: 4px; }
.est-champ b { font-family: var(--titre); font-size: 1.3rem; color: var(--orange); }
.est-champ input[type="range"] { width: 100%; appearance: none; -webkit-appearance: none; height: 6px; border-radius: 3px; background: linear-gradient(var(--orange), var(--orange)) 0 0 / var(--rempli, 0%) 100% no-repeat, #2B3243; outline: none; margin: 6px 0; }
.est-champ input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; border-radius: 50%; background: var(--blanc); border: 4px solid var(--orange); cursor: grab; }
.est-champ input[type="range"]::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 4px solid var(--orange); cursor: grab; }
.est-champ input[type="range"]:focus-visible { box-shadow: 0 0 0 3px rgba(242, 107, 29, .45); }
.est-envoi { border: 0; padding: 0; margin: 22px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.est-envoi legend { font-weight: 700; font-size: .95rem; margin-bottom: 10px; padding: 0; }
.est-envoi label { cursor: pointer; }
.est-envoi input { position: absolute; opacity: 0; pointer-events: none; }
.est-envoi span { display: inline-block; padding: 8px 14px; border: 2px solid #3A4152; border-radius: 999px; font-weight: 700; font-size: .92rem; transition: background-color .15s, border-color .15s, color .15s; }
.est-envoi input:checked + span { background: var(--orange); border-color: var(--orange); color: #121826; }
.est-envoi input:focus-visible + span { outline: 3px solid var(--orange); outline-offset: 2px; }
.est-resultat { margin-top: 26px; padding-top: 22px; border-top: 1px solid #3A4152; }
.est-total > span { display: block; font-size: .9rem; color: #B9BFCB; font-weight: 700; }
.est-total b { display: block; font-family: var(--titre); font-size: clamp(2.2rem, 5vw, 3.2rem); line-height: 1.05; color: var(--blanc); margin: 4px 0; }
.est-total small { color: #B9BFCB; font-size: .95rem; }
.est-barre { display: flex; height: 14px; border-radius: 7px; overflow: hidden; background: #2B3243; margin: 18px 0 12px; }
.est-barre span { display: block; height: 100%; transition: flex-basis .45s cubic-bezier(.2, .8, .3, 1); flex: 0 0 0%; }
.eb-prepa { background: var(--orange); }
.eb-stock { background: var(--kraft); }
.eb-transport { background: #6B7894; }
.est-legende { list-style: none; margin: 0 0 14px !important; padding: 0 !important; display: flex; flex-wrap: wrap; gap: 6px 22px; font-size: .9rem; color: #CDD2DC; }
.est-legende li { margin: 0 !important; display: flex; align-items: center; gap: 8px; }
.est-legende i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.est-legende b { color: var(--blanc); }
.est-note { font-size: .82rem; color: #8D94A3; margin: 0 0 16px; }

.comparatif { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 26px 0 0; }
.comp-col { background: var(--blanc); border-radius: 4px; padding: 20px 20px 18px; box-shadow: 0 1px 0 var(--trait); display: flex; flex-direction: column; gap: 4px; }
.comp-tag { font-family: var(--mono); font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--orange-fonce); }
.comp-col b { font-family: var(--titre); font-size: 1.5rem; line-height: 1.1; }
.comp-col > span:not(.comp-tag) { font-size: .9rem; color: var(--encre-2); line-height: 1.35; }
.comp-prix { margin-top: 12px; padding-top: 12px; border-top: 3px solid var(--encre); }
.comp-prix strong { display: block; font-family: var(--titre); font-size: 1.6rem; }
.comp-prix small { color: var(--encre-2); font-size: .85rem; }

.caches { list-style: none; padding: 0 !important; margin: 22px 0; display: grid; gap: 10px; }
.caches li { position: relative; background: var(--blanc); border-radius: 4px; padding: 16px 18px 14px 58px; margin: 0 !important; box-shadow: 0 1px 0 var(--trait); line-height: 1.45; }
.caches li::before { content: "!"; position: absolute; left: 18px; top: 15px; width: 26px; height: 26px; border: 2px solid var(--orange-fonce); color: var(--orange-fonce); border-radius: 3px; display: grid; place-items: center; font-family: var(--titre); font-size: 1rem; transform: rotate(-4deg); }
.caches b { display: block; color: var(--encre); }
.caches span { color: var(--encre-2); font-size: .98rem; }

@media (max-width: 760px) { .comparatif { grid-template-columns: 1fr; } }
@media (max-width: 560px) {
  .facture { padding: 20px 16px 16px; }
  .facture-ligne summary { flex-wrap: wrap; gap: 4px 10px; }
  .facture-ligne .points-suite { display: none; }
  .fl-quoi { flex: 1 1 calc(100% - 70px); }
  .facture-ligne summary::after { order: 2; align-self: flex-start; }
  .fl-prix { order: 3; }
  .fl-prix { margin-left: 34px; text-align: left; font-size: 1.15rem; white-space: normal; }
  .fl-prix small { display: block; }
  .facture-ligne > p { margin-left: 0; }
  .estimateur { padding: 24px 18px 22px; }
  .est-champs { grid-template-columns: 1fr; }
  .est-resultat .bouton { width: 100%; }
}
@media (prefers-reduced-motion: no-preference) {
  .facture-ligne[open] > p { animation: monte .3s ease-out; }
  @keyframes pulse-total { 0% { transform: scale(1); } 40% { transform: scale(1.04); } 100% { transform: scale(1); } }
  .est-total b.bond { animation: pulse-total .3s ease-out; transform-origin: 0 50%; }
}
@media (prefers-reduced-motion: reduce) { .est-barre span { transition: none; } }

/* Sombre : la facture reste en papier, l'estimateur garde sa palette */
[data-theme="dark"] .facture { --encre: #121826; --encre-2: #4A5163; --trait: #CDD1D7; --blanc: #F4F2EE; --orange-fonce: #C9500C; color: var(--encre); box-shadow: 0 0 0 1px rgba(0, 0, 0, .3), 0 22px 40px -22px rgba(0, 0, 0, .8); }
[data-theme="dark"] .estimateur { --encre: #121826; --blanc: #FFFFFF; --beton: #ECEEF0; box-shadow: 0 0 0 1px #263043; }
