/* Espace client (compte.html) : reprend l'en-tête du configurateur (style.css) et les cartes du suivi (suivi.css). */
.compte .connexion[hidden] { display: none; }
.compte .connexion { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 0 1.25rem; align-items: start; }
.compte .connexion .bouton { width: auto; }
.compte input.code { font-size: 1.6rem; letter-spacing: .3em; text-align: center; font-weight: 700; max-width: 12rem; }
.menu-compte { font: inherit; background: var(--accent-doux); color: var(--accent); border: 0; border-radius: 999px; padding: .3rem .9rem; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 22ch; cursor: pointer; }
.compte-tete { margin-bottom: .75rem; }
.compte-tete h1 { margin: 0 0 .2rem; }

.onglets-compte { display: flex; gap: .25rem; border-bottom: 1px solid var(--bord); margin-bottom: 1.1rem; overflow-x: auto; }
.onglets-compte button { font: inherit; background: none; border: 0; border-bottom: 2px solid transparent; padding: .55rem .9rem; color: var(--texte-doux);
  font-weight: 600; cursor: pointer; white-space: nowrap; }
.onglets-compte button[aria-selected="true"] { color: var(--accent); border-bottom-color: var(--accent); }
.onglets-compte span { font-weight: 500; }

.outils-catalogue { display: flex; gap: .6rem; flex-wrap: wrap; margin-bottom: 1rem; }
.outils-catalogue input { flex: 1 1 260px; width: auto; }
.outils-catalogue select { width: auto; }
.pieces { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1rem; }
.piece { background: var(--surface); border: 1px solid var(--bord); border-radius: var(--rayon); overflow: hidden; display: flex; flex-direction: column; }
.piece .vue { height: 140px; display: grid; place-items: center; background: var(--fond); border-bottom: 1px solid var(--bord); position: relative; padding: 10px; }
.piece .vue svg { width: 100%; height: 100%; }
.piece .vue .forme { fill: var(--accent-doux); stroke: var(--accent); stroke-width: 1.5; vector-effect: non-scaling-stroke; fill-rule: evenodd; }
.piece .vue .pli { stroke: var(--pli); stroke-width: 1.2; stroke-dasharray: 5 3; vector-effect: non-scaling-stroke; }
.piece .vue .sans-vue { color: var(--texte-doux); font-size: .85rem; }
.piece.de-atelier .vue .forme { fill: color-mix(in srgb, var(--pli) 12%, var(--surface)); stroke: var(--pli); }
.badge { position: absolute; top: 8px; left: 8px; font-size: .72rem; font-weight: 700; border-radius: 999px; padding: .05rem .55rem; background: var(--accent-doux); color: var(--accent); }
.de-atelier .badge { background: color-mix(in srgb, var(--pli) 14%, var(--surface)); color: var(--pli); }
.piece .corps { padding: .75rem .9rem .9rem; display: flex; flex-direction: column; gap: .3rem; flex: 1; }
.piece .ref { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .78rem; color: var(--texte-doux); }
.piece .nom { font-weight: 700; line-height: 1.3; }
.piece .detail { font-size: .82rem; color: var(--texte-doux); }
.piece .prix { display: flex; justify-content: space-between; align-items: flex-end; gap: .5rem; border-top: 1px dashed var(--bord); padding-top: .5rem; margin-top: auto; font-size: .85rem; }
.piece .prix b { font-size: 1.1rem; display: block; }
.piece .ecart { font-size: .78rem; text-align: right; color: var(--texte-doux); }
.piece .ecart.hausse { color: var(--attention); }
.piece .ecart.baisse { color: var(--ok); }
.piece .actions { display: flex; gap: .4rem; align-items: center; margin-top: .45rem; }
.piece .actions input { width: 4.8rem; text-align: right; padding: .4rem .5rem; }
.piece .actions .bouton { width: auto; margin: 0; padding: .45rem .8rem; font-size: .9rem; }
.piece .actions .bouton-secondaire { padding: .45rem .7rem; font-size: .9rem; }
.piece .erreur-prix { color: var(--refus); font-size: .8rem; }
.note-catalogue { font-size: .85rem; margin-top: 1.1rem; max-width: 70ch; }
.ajout-flottant { position: fixed; bottom: 1rem; left: 50%; transform: translateX(-50%); background: var(--texte); color: var(--surface); border-radius: 999px;
  padding: .55rem 1.1rem; font-weight: 600; box-shadow: 0 6px 20px rgba(0, 0, 0, .18); margin: 0; z-index: 10; }
.ajout-flottant a { color: inherit; margin-left: .6rem; }

.commandes td:last-child { text-align: right; white-space: nowrap; }
.commandes td:last-child a, .commandes td:last-child button { margin-left: .6rem; }
.lien-bouton { font: inherit; background: none; border: 0; color: var(--accent); cursor: pointer; padding: 0; text-decoration: underline; }
.boutons-compte { display: flex; gap: .5rem; flex-wrap: wrap; }
.bouton-secondaire.danger { color: var(--refus); border-color: var(--refus); }

@media (max-width: 760px) {
  .entete .accroche { display: none; }
  .entete { gap: .8rem; }
  .commandes thead { display: none; }
  .commandes tr { display: grid; grid-template-columns: 1fr auto; padding: .5rem 0; border-bottom: 1px solid var(--bord); }
  .commandes td { border: 0; padding: .1rem .3rem; }
}
.lien-espace.vers-config::before { content: "+"; font-weight: 800; font-size: 1.15rem; color: var(--accent); }

/* Faire un devis : pièces à gauche, panneau « Mon devis » à droite (en dessous sur téléphone). */
.devis-deux { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 1.1rem; align-items: start; }
.pieces-devis { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: .9rem; }
.piece-devis { background: var(--surface); border: 1px solid var(--bord); border-radius: var(--rayon); overflow: hidden; display: flex; flex-direction: column; }
.piece-devis.choisie { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-doux); }
.piece-devis .haut { display: flex; gap: .7rem; padding: .7rem .8rem; border-bottom: 1px solid var(--bord); }
.piece-devis .mini { width: 72px; height: 58px; flex: none; display: grid; place-items: center; background: var(--fond); border: 1px solid var(--bord); border-radius: 8px; padding: 4px; }
.piece-devis .mini svg { width: 100%; height: 100%; }
.piece-devis .mini .forme { fill: var(--accent-doux); stroke: var(--accent); stroke-width: 1.5; vector-effect: non-scaling-stroke; fill-rule: evenodd; }
.piece-devis .mini .pli { stroke: var(--pli); stroke-width: 1.2; stroke-dasharray: 5 3; vector-effect: non-scaling-stroke; }
.piece-devis .mini .sans-vue { font-size: .65rem; color: var(--texte-doux); text-align: center; }
.piece-devis .ref { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .75rem; color: var(--texte-doux); }
.piece-devis .nom { font-weight: 700; line-height: 1.25; display: block; }
.piece-devis .detail { font-size: .8rem; color: var(--texte-doux); display: block; }
.grille-prix { display: flex; gap: .35rem; flex-wrap: wrap; padding: .6rem .8rem; min-height: 2.9rem; }
.grille-prix button { font: inherit; font-size: .75rem; line-height: 1.2; border: 1px solid var(--bord); border-radius: 8px; padding: .2rem .5rem; background: var(--surface);
  color: var(--texte); cursor: pointer; text-align: center; }
.grille-prix button b { display: block; font-size: .85rem; }
.grille-prix button.derniere { border-style: dashed; }
.grille-prix button.active { border-color: var(--accent); background: var(--accent-doux); color: var(--accent); }
.grille-prix .attente { font-size: .8rem; color: var(--texte-doux); align-self: center; }
.piece-devis .bas { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; padding: .55rem .8rem; border-top: 1px dashed var(--bord); margin-top: auto; }
.piece-devis .bas input { width: 4.8rem; text-align: right; padding: .35rem .5rem; }
.piece-devis .bas .bouton, .piece-devis .bas .bouton-secondaire { width: auto; margin: 0; padding: .4rem .7rem; font-size: .85rem; }
.piece-devis .bas .pousse { margin-left: auto; }
.statut-ligne { font-size: .72rem; font-weight: 700; border-radius: 999px; padding: .1rem .55rem; white-space: nowrap; }
.statut-ligne.ferme { background: color-mix(in srgb, var(--ok) 14%, var(--surface)); color: var(--ok); }
.statut-ligne.a-confirmer { background: color-mix(in srgb, var(--attention) 16%, var(--surface)); color: var(--attention); }

.panneau-devis { position: sticky; top: 1rem; }
.panneau-devis h2 { margin-top: 0; }
.lignes-mon-devis { table-layout: fixed; width: 100%; }
.lignes-mon-devis th:nth-child(2), .lignes-mon-devis td:nth-child(2) { width: 2.6rem; }
.lignes-mon-devis th:nth-child(3), .lignes-mon-devis td:nth-child(3),
.lignes-mon-devis th:nth-child(4), .lignes-mon-devis td:nth-child(4) { width: 4.6rem; }
.lignes-mon-devis th:last-child, .lignes-mon-devis td:last-child { width: 1.4rem; padding-left: 0; padding-right: 0; }
.lignes-mon-devis td, .lignes-mon-devis th { font-size: .82rem; vertical-align: top; padding-left: .3rem; padding-right: .3rem; overflow-wrap: anywhere; }
.lignes-mon-devis .statut-ligne { display: inline-block; margin-top: .2rem; }
.lignes-mon-devis button { font: inherit; background: none; border: 0; color: var(--texte-doux); cursor: pointer; padding: 0 .2rem; }
.total-devis b { text-align: right; }
.total-devis b small { display: block; font-size: .78rem; font-weight: 600; color: var(--texte-doux); }
.total-devis { display: flex; justify-content: space-between; align-items: flex-start; font-size: 1.15rem; border-top: 2px solid var(--texte); padding-top: .5rem; margin: .6rem 0 .3rem; }
.note-devis { font-size: .82rem; margin: .3rem 0; }
.note-devis:empty { display: none; }
#obtenir-mon-devis { width: 100%; }
.fenetre-variante { width: min(460px, calc(100vw - 32px)); }
.fenetre-variante h2 { margin: 0 1.5rem .4rem 0; }
.fenetre-variante .champ { margin-bottom: .5rem; }
.devis-ligne-detail { font-size: .8rem; color: var(--texte-doux); }
#form-accepter[hidden] { display: none; }
#form-accepter { margin-top: 1rem; max-width: 560px; }

@media (max-width: 900px) {
  .devis-deux { grid-template-columns: 1fr; }
  .panneau-devis { position: static; }
}
a.bouton-secondaire { display: inline-block; text-decoration: none; }

/* Mes devis : devis de l'atelier, choix des quantités et acompte à l'acceptation */
.origine-devis { display: inline-block; margin-left: .35rem; font-size: .72rem; font-weight: 600; border-radius: 10px; padding: 0 .5rem; border: 1px solid currentColor; }
.origine-devis.par-atelier { color: var(--accent); background: var(--accent-doux); }
.origine-devis.en-ligne { color: var(--texte-doux); }
.lignes-choix { margin: .4rem 0 .8rem; }
.lignes-choix td { vertical-align: middle; }
.quantites-choix { display: flex; flex-wrap: wrap; gap: .3rem; }
.quantite-choix { font: inherit; font-size: .85rem; border: 1px solid var(--bord); border-radius: 14px; padding: .1rem .7rem; background: var(--surface); color: var(--texte); cursor: pointer; }
.quantite-choix[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
.ligne-variante td:first-child { padding-left: 1.4rem; }
.ligne-variante label, .ligne-option label { display: flex; gap: .45rem; align-items: center; cursor: pointer; }
.ligne-variante input, .ligne-option input { width: auto; }
.ligne-ecartee { color: var(--texte-doux); }
.acompte-devis { margin: .2rem 0; font-size: 1.02rem; }
.coordonnees-virement { display: grid; grid-template-columns: max-content 1fr; gap: .3rem 1rem; margin: .6rem 0; }
.coordonnees-virement dt { color: var(--texte-doux); }
.coordonnees-virement dd { margin: 0; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; word-break: break-all; }
.devis-signale td { background: var(--accent-doux); }
