/* Ateliers du moule ARTISANS (24/10/2026) : toit du couvreur, mur porteur du maçon, placard du menuisier (puis fuite du plombier et tableau de l'électricien, 25/10).
   Le panneau garde les couleurs de la marque de l'artisan dans les deux thèmes : il lit les variables de la charte de la page
   (--nuit, --nuit-3, --or, --or-clair, --sur-nuit, --sur-nuit-doux, --texte) et prend la charte Livradois s'il ne les trouve pas.
   Toutes les classes commencent par « at- » pour ne jamais heurter celles du site. Pensé d'abord pour le téléphone (390 px). */
.atelier-bloc {
  --at-nuit: var(--nuit, #1B2440);
  --at-nuit-3: var(--nuit-3, #26304F);
  --at-or: var(--or, #E2B35A);
  --at-or-clair: var(--or-clair, #F1CD84);
  --at-sur: var(--sur-nuit, #F5F2EC);
  --at-sur-doux: var(--sur-nuit-doux, rgb(245 242 236 / .78));
  --at-filet: rgb(245 242 236 / .16);
  --at-police: var(--texte, 'Instrument Sans', 'Segoe UI', system-ui, sans-serif);
  font-family: var(--at-police);
}
.atelier-bloc *, .atelier-bloc *::before, .atelier-bloc *::after { box-sizing: border-box; }
.at-carte { background: radial-gradient(50% 60% at 95% 0%, rgb(241 205 132 / .13), transparent 70%), var(--at-nuit); color: var(--at-sur); border-radius: 22px; padding: clamp(14px, 2.6vw, 36px); display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; align-items: center; }
.at-boite { position: relative; aspect-ratio: 3 / 2; max-width: 100%; border-radius: 16px; overflow: hidden; background: var(--at-nuit-3); box-shadow: 0 30px 60px -32px rgb(0 0 0 / .7); }
.at-boite svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; max-width: none; }
.at-panneau { display: grid; gap: 14px; min-width: 0; align-content: start; justify-items: start; }
.at-panneau > * { max-width: 100%; }
.at-puce { font: 600 11px/1 var(--at-police); letter-spacing: .06em; text-transform: uppercase; padding: 7px 10px; border-radius: 99px; background: rgb(241 205 132 / .14); color: var(--at-or-clair); }
.at-surtitre { margin: 0; font: 600 14px/1.2 var(--at-police); letter-spacing: .02em; color: var(--at-or-clair); }
.at-titre { margin: 0; font: 700 clamp(22px, 5.4vw, 30px)/1.12 var(--at-police); letter-spacing: -.02em; color: #fff; text-wrap: balance; }
.at-titre em { font-style: normal; color: var(--at-or-clair); }
.at-intro { margin: 0; color: var(--at-sur-doux); font-size: 16px; line-height: 1.5; }
.at-etiquette { font: 600 12px/1 var(--at-police); letter-spacing: .07em; text-transform: uppercase; color: var(--at-sur-doux); }
.at-choix { display: flex; flex-wrap: wrap; gap: 8px; }
.at-choix button { min-height: 44px; font: 600 15px/1.1 var(--at-police); padding: 10px 14px; border-radius: 99px; border: 1px solid var(--at-filet); background: rgb(255 255 255 / .05); color: var(--at-sur); cursor: pointer; transition: background-color .2s ease, border-color .2s ease; }
.at-choix button:hover { border-color: rgb(241 205 132 / .6); }
.at-choix button[aria-pressed="true"] { background: var(--at-or); border-color: var(--at-or); color: var(--at-nuit); }
.at-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 52px; font: 700 16px/1.15 var(--at-police); padding: 14px 22px; border-radius: 99px; background: var(--at-or); color: var(--at-nuit); border: 0; cursor: pointer; text-align: center; }
.at-btn:hover { background: var(--at-or-clair); }
.at-btn:active { transform: translateY(1px); }
.atelier-bloc :focus-visible { outline: 3px solid var(--at-or); outline-offset: 2px; }
.at-resultat { width: 100%; display: grid; gap: 4px; padding: 14px 16px; border-radius: 14px; background: rgb(255 255 255 / .06); border: 1px solid var(--at-filet); }
.at-prix { font: 700 clamp(26px, 6vw, 32px)/1 var(--at-police); color: var(--at-or-clair); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.at-ligne { font-size: 15px; color: var(--at-sur); font-variant-numeric: tabular-nums; }
.at-note { font-size: 13px; line-height: 1.45; color: var(--at-sur-doux); }
.at-glisse { width: 100%; display: grid; gap: 4px; }
.at-glisse label { display: flex; justify-content: space-between; gap: 10px; font: 600 15px/1.2 var(--at-police); }
.at-glisse output { color: var(--at-or-clair); font-variant-numeric: tabular-nums; white-space: nowrap; }
.at-glisse input[type="range"] { width: 100%; accent-color: var(--at-or); height: 36px; margin: 0; cursor: pointer; }
.at-astuce { margin: 0; font: 600 14px/1.35 var(--at-police); color: var(--at-or-clair); }

/* le toit : la scène zoome sur la zone touchée, les points battent */
.at-scene { position: absolute; inset: 0; transform-origin: 0 0; will-change: transform; }
.at-point { position: absolute; left: var(--l); top: var(--t); width: 32px; height: 32px; margin: -16px 0 0 -16px; border-radius: 50%; border: 2px solid #fff; background: rgb(27 36 64 / .62); cursor: pointer; padding: 0; display: grid; place-items: center; color: #fff; font: 700 16px/1 var(--at-police); }
.at-point::before { content: ""; position: absolute; inset: -8px; border-radius: 50%; }
.at-point::after { content: ""; position: absolute; inset: -7px; border-radius: 50%; border: 2px solid rgb(255 255 255 / .75); animation: at-pouls 1.8s ease-out infinite; }
.at-point[aria-pressed="true"] { background: var(--at-or); border-color: var(--at-or-clair); color: var(--at-nuit); }
.at-point[aria-pressed="true"]::after { border-color: var(--at-or-clair); }
@keyframes at-pouls { 0% { transform: scale(.7); opacity: 1; } 100% { transform: scale(1.5); opacity: 0; } }
.at-pluie line { stroke: rgb(255 255 255 / .55); stroke-width: 1.4; stroke-linecap: round; animation: at-tombe .9s linear infinite; }
@keyframes at-tombe { from { transform: translate(0, -60px); } to { transform: translate(-14px, 60px); } }
.at-fiche { width: 100%; display: grid; gap: 8px; padding: 16px; border-radius: 14px; background: rgb(255 255 255 / .06); border: 1px solid var(--at-filet); }
.at-fiche h3 { margin: 0; font: 700 18px/1.2 var(--at-police); color: #fff; }
.at-fiche p { margin: 0; color: var(--at-sur-doux); font-size: 15px; line-height: 1.5; }
.at-fiche dl { margin: 4px 0 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.at-fiche dt { font: 600 11px/1 var(--at-police); letter-spacing: .07em; text-transform: uppercase; color: var(--at-sur-doux); }
.at-fiche dd { margin: 4px 0 0; font: 700 16px/1.2 var(--at-police); color: var(--at-or-clair); }

/* la fuite du plombier (25/10/2026) : la maison en coupe est plus large que le toit (dessin 400 x 250) */
.at-fuite .at-boite { aspect-ratio: 8 / 5; background: #FBFAF7; }
/* sur le dessin clair, les points sont bleu nuit à anneau cuivre ; le point touché garde l'or commun (règle « pressed » de plus haut) */
.at-fuite .at-point:not([aria-pressed="true"]) { border-color: #1B2440; background: rgb(27 36 64 / .78); }
.at-fuite .at-point:not([aria-pressed="true"])::after { border-color: rgb(201 120 74 / .85); }

/* la pose du carreleur (27/10/2026) : la salle de bain vue de face, même largeur que la fuite (dessin 400 x 250) */
.at-pose .at-boite { aspect-ratio: 8 / 5; background: #FBFAF7; }

/* la porte du serrurier (27/10/2026) : le palier vu de face (dessin 400 x 250), points bleu nuit à anneau or comme la fuite */
.at-porte .at-boite { aspect-ratio: 8 / 5; background: #FBFAF7; }
.at-porte .at-point:not([aria-pressed="true"]) { border-color: #1B2440; background: rgb(27 36 64 / .78); }
.at-porte .at-point:not([aria-pressed="true"])::after { border-color: rgb(226 179 90 / .9); }

/* le tableau de l'électricien (25/10/2026) : le tableau en vrais boutons sur fond clair, deux rangées de modules sur leur rail.
   Une manette baissée = aria-pressed="true" : elle descend, le module se cerne de rouille. Tailles en variables, plus grandes sur ordinateur. */
.at-tableau { --at-mw: 34px; --at-mh: 64px; --at-rouille: #B4532F; }
.at-tableau .at-boite { aspect-ratio: auto; background: #FBFAF7; display: grid; align-content: center; justify-items: center; gap: 14px; padding: clamp(14px, 3vw, 32px) clamp(10px, 2.4vw, 32px); }
.at-tableau-face { width: 100%; max-width: 520px; display: grid; background: #fff; border: 1.4px solid #1B2440; border-radius: 12px; padding: 6px 8px 4px; box-shadow: 0 14px 28px -20px rgb(27 36 64 / .55); }
.at-tab-etiq { margin: 4px 0 0 4px; font: 600 12px/1 var(--at-police); letter-spacing: .14em; text-transform: uppercase; color: #4B5470; }
.at-rangee { display: flex; justify-content: center; align-items: start; gap: 6px; padding: 10px 0 8px;
  background: linear-gradient(transparent calc(10px + var(--at-mh) / 2 - 4px), #E9E4D8 calc(10px + var(--at-mh) / 2 - 4px), #E9E4D8 calc(10px + var(--at-mh) / 2 + 4px), transparent calc(10px + var(--at-mh) / 2 + 4px)); }
.at-rangee + .at-rangee { border-top: 1px dashed #D9D3C6; }
.at-module { display: grid; justify-items: center; align-content: start; gap: 6px; background: transparent; border: 0; padding: 0 2px; min-width: 44px; min-height: 44px; max-width: 78px; cursor: pointer; font: 600 12px/1.2 var(--at-police); color: #1B2440; text-align: center; }
.at-corps { position: relative; width: var(--at-mw); height: var(--at-mh); background: #fff; border: 1.4px solid #1B2440; border-radius: 5px; transition: border-color .2s ease, box-shadow .2s ease, background-color .2s ease; }
.at-diff .at-corps { width: calc(var(--at-mw) * 1.53); }
.at-corps::before { content: ""; position: absolute; left: 50%; top: 21.9%; width: calc(var(--at-mw) * .53); height: 53%; transform: translateX(-50%); background: #1B2440; border-radius: 3px; }
.at-levier { position: absolute; left: 50%; top: 21.9%; width: calc(var(--at-mw) * .53); height: 26.5%; transform: translateX(-50%); background: var(--at-or); border: 1.2px solid #A9802E; border-radius: 3px; transition: top .28s cubic-bezier(.3, 1.6, .5, 1), background-color .2s ease; }
.at-t { position: absolute; right: 4px; top: 4px; width: 12px; height: 12px; border-radius: 50%; background: #E9E4D8; font: 700 7.5px/12px var(--at-police); color: #1B2440; text-align: center; }
.at-t::before { content: "T"; }
.at-module:hover .at-corps { border-color: #A9802E; }
.at-module[aria-pressed="true"] .at-levier { top: 48.4%; background: #F1ECE2; border-color: #1B2440; }
.at-module[aria-pressed="true"] .at-corps { border-color: var(--at-rouille); box-shadow: 0 0 0 3px rgb(180 83 47 / .22); }
.at-module[aria-pressed="true"] .at-etiq { color: var(--at-rouille); }
.at-tableau-face.at-eteint .at-corps { background: #F2EFE8; }
.at-tableau-face.at-eteint .at-levier { background: #D9CFB8; border-color: #A39883; }
.at-tout { min-height: 44px; padding: 10px 16px; border-radius: 99px; border: 1.4px solid #1B2440; background: #fff; color: #1B2440; font: 600 14px/1.2 var(--at-police); cursor: pointer; text-align: center; }
.at-tout:hover { border-color: #A9802E; }
.at-tout[aria-pressed="true"] { background: #1B2440; color: #fff; }
.at-tableau .at-boite :focus-visible { outline-color: #1B2440; }

/* le mur porteur : les étapes du chantier */
.at-etapes { list-style: none; margin: 0; padding: 0; width: 100%; display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px 12px; }
.at-etapes li { display: flex; gap: 8px; align-items: center; font-size: 14px; color: var(--at-sur-doux); transition: color .3s ease; }
.at-etapes li::before { content: ""; flex: none; width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--at-filet); transition: background-color .3s ease, border-color .3s ease; }
.at-etapes li.fait { color: var(--at-sur); }
.at-etapes li.fait::before { background: var(--at-or); border-color: var(--at-or); }

/* le placard : les colonnes se touchent */
.at-placard .at-col { cursor: pointer; outline: none; }
.at-placard .at-col:focus-visible { stroke: var(--at-or); stroke-width: 4; }

@media (min-width: 440px) { .at-etapes { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 420px) { .at-point { width: 28px; height: 28px; margin: -14px 0 0 -14px; font-size: 14px; } }
@media (min-width: 900px) { .at-carte { grid-template-columns: minmax(0, 1.3fr) minmax(0, .85fr); gap: clamp(24px, 3vw, 40px); } }
@media (min-width: 900px) { .at-tableau { --at-mw: 46px; --at-mh: 86px; } .at-rangee { gap: 14px; } .at-module { font-size: 13.5px; max-width: 100px; } .at-tab-etiq { font-size: 13px; } }
@media (prefers-reduced-motion: reduce) {
  .at-point::after, .at-pluie line { animation: none; }
  .at-pluie { display: none; }
  .at-choix button, .at-etapes li, .at-etapes li::before { transition: none; }
  .at-levier, .at-corps { transition: none; }
}
