/* Maillure · demande de devis (étude de création).
   Young Serif pour les titres, Public Sans pour l'interface et les cotes. Polices SIL OFL locales.
   Le plan coté est le cœur de l'écran : il se redessine à chaque cote, en noyer sur le copeau,
   les cotes en sapin, comme sur la planche de l'atelier.
   Une feuille pour toutes les tailles : la mise en page suit son conteneur. */
@font-face { font-family: "Young Serif"; src: url("../../fonts/YoungSerif-Regular.woff2") format("woff2"); font-weight: 400; font-display: block; }
@font-face { font-family: "Public Sans"; src: url("../../fonts/PublicSans-wght.woff2") format("woff2"); font-weight: 300 800; font-display: block; }

:root {
  --noyer: #33241A;
  --chene: #C99A62;
  --chene-pale: #E6CFAE;
  --copeau: #F3EDE2;
  --blanc: #FBF8F3;
  --sapin: #34503F;
  --sapin-pale: #DCE5DD;
  --brou: #6E5644;
  --rouge: #A3341F;
  --filet: rgba(51, 36, 26, .16);
  --young: "Young Serif", Georgia, serif;
  --sans: "Public Sans", system-ui, sans-serif;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body { background: #8C8178; font-family: var(--sans); color: var(--noyer); font-size: 15px; line-height: 1.45; -webkit-font-smoothing: antialiased; }
ol, ul { list-style: none; }
button, input, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }
fieldset { border: 0; min-width: 0; }
:focus-visible { outline: 2px solid var(--sapin); outline-offset: 2px; }

.planche { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 40px; padding: 40px; }
.ecran { background: var(--blanc); overflow: hidden; display: flex; flex-direction: column; flex: none; container-type: inline-size; }
.ecran--tel { width: 390px; height: 844px; }
.ecran--bureau { width: 1280px; height: 800px; }
.page-devis { min-height: 100vh; background: var(--blanc); }
.page-devis .ecran { width: 100%; max-width: 1180px; margin: 0 auto; overflow: visible; }

/* En-tête et fil des étapes */
.tete-app { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--filet); }
.tete-app__logo { height: 26px; width: auto; display: block; }
.tete-app__t { font-size: 12px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--sapin); white-space: nowrap; }
.fil { display: grid; grid-template-columns: repeat(4, 1fr); padding: 0 20px; border-bottom: 1px solid var(--filet); }
.fil li { display: flex; align-items: center; gap: 6px; padding: 12px 0 10px; font-size: 12.5px; font-weight: 600; color: var(--brou); box-shadow: inset 0 -3px 0 transparent; min-width: 0; }
.fil span { width: 20px; height: 20px; flex: none; display: grid; place-items: center; border-radius: 50%; font-size: 11px; box-shadow: inset 0 0 0 1.5px currentColor; }
.fil .ici { color: var(--noyer); box-shadow: inset 0 -3px 0 var(--chene); }
.fil .ici span { background: var(--noyer); color: var(--blanc); box-shadow: none; }
.fil .fait span { background: var(--sapin); color: var(--blanc); box-shadow: none; }

/* Corps */
.corps { flex: 1; min-height: 0; display: grid; grid-template-rows: auto 1fr auto; }
.col { padding: 20px 20px 4px; overflow: hidden; }
.col--plan { order: -1; padding: 14px 20px 0; background: var(--copeau); }
.corps > .col:not(.col--plan) { overflow-y: auto; }
h1 { font-family: var(--young); font-weight: 400; font-size: 27px; line-height: 1.08; letter-spacing: -.01em; }
.aide { margin-top: 8px; color: var(--brou); font-size: 14.5px; }
.legende { margin: 6px 0 12px; font-size: 13px; color: var(--brou); }

.plan { width: 100%; height: auto; display: block; max-height: 160px; }
.plan--petit { max-height: 150px; }
.pc-b { stroke: var(--noyer); stroke-width: 1.6; stroke-linejoin: round; }
.pc-l { stroke: var(--noyer); fill: none; }
.pc-sol { stroke: var(--noyer); stroke-width: 1; stroke-dasharray: 5 4; }
.pc-main { fill: none; stroke: var(--sapin); stroke-width: 2.6; stroke-linecap: round; }
.pc-cote { fill: none; stroke: var(--sapin); stroke-width: 1.4; }
.pc-fond { fill: var(--copeau); }
.plan text { font-family: var(--sans); font-weight: 650; fill: var(--sapin); }

/* Choix de la pièce */
.choix { margin-top: 16px; display: grid; gap: 8px; }
.choix__l { display: block; cursor: pointer; }
.choix__l input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.choix__c { display: grid; grid-template-columns: 52px 1fr; align-items: center; gap: 12px; padding: 8px 14px; box-shadow: inset 0 0 0 1.5px var(--filet); border-radius: 3px; }
.choix__c b { display: block; font-weight: 650; }
.choix__c small { display: block; font-size: 13px; color: var(--brou); }
.mini { width: 52px; height: auto; fill: var(--chene); stroke: var(--noyer); stroke-width: 1.4; }
.choix__l input:checked + .choix__c { box-shadow: inset 0 0 0 2px var(--noyer); background: var(--copeau); }
.choix__l input:focus-visible + .choix__c { outline: 2px solid var(--sapin); outline-offset: 2px; }

/* Champs */
.champs { margin-top: 16px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; align-items: end; }
.champs--deux { grid-template-columns: 1fr; }
.champ { display: flex; flex-direction: column; gap: 5px; margin-top: 2px; min-width: 0; }
.champ > span:first-child { font-size: 12.5px; font-weight: 650; color: var(--brou); }
.champ input, .champ textarea { width: 100%; min-height: 44px; padding: 8px 10px; background: #FFFFFF; border: 1.5px solid var(--filet); border-radius: 3px; }
.champ textarea { resize: vertical; min-height: 64px; }
.champ__unite { position: relative; display: block; }
.champ__unite input { padding-right: 32px; font-size: 17px; font-weight: 600; font-variant-numeric: tabular-nums; }
.champ__unite i { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); font-style: normal; font-size: 13px; color: var(--brou); }
.champ--err input { border-color: var(--rouge); }
.err { font-size: 12.5px; line-height: 1.3; color: var(--rouge); }
.calcul { margin-top: 12px; padding: 10px 12px; background: var(--sapin-pale); font-size: 14px; }
.pastilles { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 6px; }
.pastilles legend { width: 100%; margin-bottom: 6px; font-size: 12.5px; font-weight: 650; color: var(--brou); }
.pastilles label { cursor: pointer; }
.pastilles input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.pastilles span { display: inline-flex; align-items: center; gap: 7px; min-height: 38px; padding: 0 13px; border-radius: 19px; font-size: 14px; font-weight: 600; box-shadow: inset 0 0 0 1.5px var(--filet); }
.pastilles i { width: 14px; height: 14px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(51, 36, 26, .3); }
.pastilles input:checked + span { background: var(--noyer); color: var(--blanc); box-shadow: none; }
.pastilles input:focus-visible + span { outline: 2px solid var(--sapin); outline-offset: 2px; }

.inclus { display: none; margin-top: 28px; }
.inclus li { display: flex; align-items: center; gap: 12px; padding: 9px 0; border-top: 1px solid var(--filet); font-size: 14px; color: var(--brou); }
.inclus li::before { content: ""; width: 22px; height: 9px; flex: none; border: 1.5px solid var(--sapin); border-top: 0; border-bottom: 0; background: linear-gradient(var(--sapin), var(--sapin)) center / 100% 1.5px no-repeat; }

/* Prix et récapitulatif */
.prix { margin: 4px 0 14px; padding: 10px 0 0; border-top: 1px solid var(--filet); display: grid; grid-template-columns: 1fr auto; align-items: baseline; column-gap: 12px; }
.prix__t { font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--sapin); }
.prix b { font-family: var(--young); font-weight: 400; font-size: 21px; white-space: nowrap; }
.prix__n { grid-column: 1 / -1; margin-top: 2px; font-size: 12.5px; color: var(--brou); }
.recap__t { font-size: 14px; font-weight: 600; margin-top: 4px; }
.tampon { display: inline-block; padding: 4px 10px; font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--sapin); box-shadow: inset 0 0 0 1.5px var(--sapin); border-radius: 2px; margin-bottom: 12px; }
.suite { margin-top: 16px; counter-reset: s; }
.suite li { position: relative; padding: 10px 0 10px 36px; border-top: 1px solid var(--filet); font-size: 14.5px; color: var(--brou); }
.suite li::before { counter-increment: s; content: counter(s); position: absolute; left: 0; top: 10px; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; background: var(--chene-pale); color: var(--noyer); font-size: 12.5px; font-weight: 700; }
.suite b { color: var(--noyer); }

/* Barre d'actions */
.barre { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 20px 18px; border-top: 1px solid var(--filet); background: var(--blanc); }
.bouton { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 20px; font-weight: 650; font-size: 15px; border-radius: 2px; white-space: nowrap; }
.bouton--plein { background: var(--noyer); color: var(--blanc); }
.bouton--plein:hover { background: var(--sapin); }
.bouton--trait { box-shadow: inset 0 0 0 1.5px var(--noyer); }
.bouton--trait:hover { background: var(--copeau); }

/* Grand écran : le formulaire à gauche, le plan coté à droite, en grand. */
@container (min-width: 860px) {
  .tete-app { padding: 20px 40px; }
  .tete-app__logo { height: 32px; }
  .fil { padding: 0 40px; gap: 18px; }
  .fil li { font-size: 13.5px; }
  .corps { grid-template-columns: minmax(0, 1fr) minmax(0, 1.12fr); grid-template-rows: 1fr auto; }
  .col { padding: 34px 40px 20px; }
  .col--plan { order: 0; display: flex; flex-direction: column; justify-content: center; padding: 28px 44px; }
  .plan, .plan--petit { max-height: none; }
  h1 { font-size: 38px; }
  .champs--deux { grid-template-columns: 1fr 1fr; }
  .inclus { display: block; }
  .barre { grid-column: 1 / -1; padding: 16px 40px; }
  .prix { margin-top: 18px; padding-top: 14px; }
  .prix b { font-size: 28px; }
}
@container (max-width: 359px) {
  .tete-app__t { display: none; }
  .fil li { font-size: 0; justify-content: center; }
  .champs { grid-template-columns: 1fr 1fr; }
}
