/* Atelier « Créer mon modèle », créations sauvegardées, transitions (L'Atelier Eure'iginal) */

/* ---------- fiche produit : appel à l'atelier + photo recolorée */
.atCta { display: flex; align-items: center; gap: 14px; width: 100%; margin-top: 16px; padding: 14px 16px; border: 0; border-radius: var(--r-lg);
  background: linear-gradient(135deg, var(--ink), var(--ink-2)); color: #fff; text-align: left; cursor: pointer; box-shadow: 0 8px 22px rgba(30, 42, 74, .25); position: relative; overflow: hidden; }
.atCta::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: var(--stitch); opacity: .9; }
.atCta strong { display: block; font-family: var(--font-display); font-size: 1.15rem; }
.atCta small { display: block; color: #d5dbea; font-size: .84rem; margin-top: 2px; }
.atCtaIco { flex: 0 0 auto; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--safran); color: var(--ink); font-size: 1.3rem; }
.atCta:focus-visible { outline: 3px solid var(--safran); outline-offset: 3px; }
.gallery .main .mock-prev { width: 100%; height: 100%; object-fit: contain; display: block; background: radial-gradient(ellipse at 50% 45%, #fff 0, #e4e7ee 75%); }

/* ---------- atelier plein écran */
.at { position: fixed; inset: 0; z-index: 80; background: var(--bg); display: flex; flex-direction: column; padding: env(safe-area-inset-top) 0 env(safe-area-inset-bottom); color: var(--text); }
.atTop { display: flex; align-items: center; gap: 8px; padding: 10px 12px 4px; }
.atHead { flex: 1; min-width: 0; text-align: center; }
.atHead small { display: block; color: var(--muted); font-size: .72rem; letter-spacing: .07em; text-transform: uppercase; font-weight: 600; }
.atHead h2 { font-size: 1.3rem; margin-top: 2px; }
.atIco { flex: 0 0 auto; width: 44px; height: 44px; border-radius: 50%; border: 1.5px solid var(--line); background: #fff; color: var(--ink); font-size: 1.3rem; line-height: 1; cursor: pointer; }
.atIco:focus-visible { outline: 3px solid var(--safran); outline-offset: 2px; }
.atHeart { color: var(--rouge); }
.atHeart[aria-pressed="true"] { background: var(--rouge); color: #fff; border-color: var(--rouge); }
.atDots { display: flex; gap: 6px; list-style: none; margin: 6px auto 8px; padding: 0 14px; width: 100%; max-width: 760px; }
.atDots li { flex: 1; height: 5px; border-radius: 9px; background: var(--line); cursor: pointer; position: relative; transition: background-color .3s; }
.atDots li span { position: absolute; inset: -8px 0; font-size: 0; }
.atDots li.ok { background: color-mix(in srgb, var(--safran) 70%, var(--line)); }
.atDots li.on { background: var(--ink); }
.atBody { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(330px, .9fr); max-width: 1240px; width: 100%; margin: 0 auto; }
.atStage { position: relative; min-height: 0; margin: 0 8px 8px 14px; border-radius: var(--r-lg); overflow: hidden; background: radial-gradient(ellipse at 50% 42%, #ffffff 0, #e2e6ee 78%); }
.atStage canvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; cursor: grab; display: block; }
.at[data-step="creation"] .atStage canvas { cursor: move; }
.atViews { position: absolute; left: 10px; top: 10px; display: flex; gap: 3px; padding: 3px; background: rgba(255, 255, 255, .92); border: 1px solid var(--line); border-radius: 999px; }
.atViews button { border: 0; background: none; padding: 7px 13px; border-radius: 999px; font-weight: 600; font-size: .85rem; color: var(--ink); cursor: pointer; }
.atViews button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.atZoom { position: absolute; right: 10px; top: 10px; display: flex; align-items: center; gap: 2px; padding: 3px; background: rgba(255, 255, 255, .92); border: 1px solid var(--line); border-radius: 999px; }
.atZoom button { width: 34px; height: 34px; border: 0; border-radius: 50%; background: none; font-size: 1.15rem; color: var(--ink); cursor: pointer; }
.atZoom span { min-width: 34px; text-align: center; font-size: .78rem; color: var(--muted); font-weight: 600; }
.atHint { position: absolute; left: 10px; right: 10px; bottom: 8px; margin: 0; text-align: center; font-size: .76rem; color: var(--muted); pointer-events: none; }
.atBub { position: absolute; left: 0; right: 0; top: 56px; width: max-content; max-width: calc(100% - 20px); margin: 0 auto; padding: 7px 13px; border-radius: 999px; background: rgba(30, 42, 74, .9); color: #fff; font-weight: 600; font-size: .82rem; pointer-events: none; }
.atBub.lim { background: var(--rouge); }
.atPanel { overflow: auto; padding: 4px 16px 18px 8px; -webkit-overflow-scrolling: touch; }
.atFoot { display: flex; align-items: center; gap: 12px; padding: 10px 14px; background: var(--ink); color: #fff; }
.atFoot::before { content: ""; position: absolute; }
.atPrice { flex: 1; min-width: 0; }
.atPrice b { display: block; font-family: var(--font-display); font-size: 1.25rem; color: var(--safran); }
.atPrice small { display: block; font-size: .78rem; color: #c9d0e0; }
.atFoot .btn { min-width: 170px; }
.atTxt { margin: 2px 0 12px; color: var(--muted); font-size: .92rem; }
.atNote { margin: 12px 0 0; color: var(--muted); font-size: .8rem; }
.atInfo { margin: 0 0 12px; padding: 10px 12px; border-radius: var(--r-md); background: #e8ecf6; color: var(--ink); font-size: .88rem; }
.atInfo.warn { background: var(--safran-soft); color: #5a4210; }
.atLbl { margin: 12px 0 6px; font-size: .74rem; letter-spacing: .07em; text-transform: uppercase; font-weight: 700; color: var(--muted); }
.atRow { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
/* couleurs */
.atSws { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 10px; }
.atSw { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 6px 2px; border: 0; background: none; cursor: pointer; border-radius: 12px; }
.atSw i { width: 48px; height: 48px; border-radius: 50%; border: 1px solid rgba(0, 0, 0, .15); box-shadow: inset 0 -6px 10px rgba(0, 0, 0, .08), inset 0 4px 8px rgba(255, 255, 255, .25); transition: transform .15s; }
.atSw span { font-size: .76rem; color: var(--muted); text-align: center; line-height: 1.2; }
.atSw[aria-pressed="true"] i { outline: 3px solid var(--ink); outline-offset: 3px; }
.atSw[aria-pressed="true"] span { color: var(--ink); font-weight: 700; }
.atSw:focus-visible { outline: 2px solid var(--safran); }
/* création */
.atAdd { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
.atAddBtn { display: flex; flex-direction: column; gap: 3px; padding: 14px 12px; border: 2px dashed var(--ink); border-radius: var(--r-md); background: #fff; color: var(--ink); cursor: pointer; text-align: left; }
.atAddBtn b { font-size: 1rem; }
.atAddBtn small { font-size: .74rem; color: var(--muted); }
.atAddBtn:hover { background: var(--safran-soft); }
.atAddBtn:focus-within, .atAddBtn:focus-visible { outline: 3px solid var(--safran); }
.atEls { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 8px; }
.atEl { flex: 0 0 auto; display: grid; grid-template-columns: 38px auto; grid-template-rows: auto auto; column-gap: 8px; align-items: center; padding: 6px 10px 6px 6px; border: 1.5px solid var(--line); border-radius: 12px; background: #fff; cursor: pointer; text-align: left; }
.atEl img, .atEl .atElT { grid-row: 1 / 3; width: 38px; height: 38px; object-fit: contain; border-radius: 8px; background: #eef0f4; display: grid; place-items: center; font-weight: 800; font-size: .8rem; color: var(--ink); }
.atEl span:not(.atElT) { font-size: .82rem; font-weight: 600; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.atEl small { font-size: .7rem; color: var(--muted); }
.atEl[aria-pressed="true"] { border: 2px dashed var(--ink); background: var(--safran-soft); }
.atCotes { margin: 4px 0 10px; padding: 9px 12px; border: 1.5px dashed var(--safran); border-radius: var(--r-md); background: #fff; font-size: .86rem; }
.atCotes::before { content: "📍 "; }
#atTools textarea, .atField input, .atField textarea { width: 100%; padding: 11px 12px; border: 1.5px solid var(--line); border-radius: var(--r-md); background: #fff; font-size: 1rem; resize: vertical; }
.atFont { font-size: .95rem; }
.atTc { width: 32px; height: 32px; border-radius: 50%; border: 1px solid rgba(0, 0, 0, .2); cursor: pointer; }
.atTc[aria-pressed="true"] { outline: 3px solid var(--ink); outline-offset: 2px; }
.atSize { display: grid; grid-template-columns: auto 1fr; gap: 2px 12px; align-items: center; margin: 12px 0 6px; }
.atSize span { font-size: .74rem; letter-spacing: .07em; text-transform: uppercase; font-weight: 700; color: var(--muted); }
.atSize input { width: 100%; accent-color: var(--ink); }
.atSize b { grid-column: 2; font-size: .86rem; }
.atDel { color: var(--rouge); border-color: var(--rouge); }
/* options, tailles, récap */
.atField { margin: 0 0 16px; }
.atField h3 { font-size: 1rem; margin: 0 0 8px; }
.atField .req { color: var(--rouge); }
.atCards { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.atCard { display: flex; flex-direction: column; gap: 3px; padding: 12px; border: 1.5px solid var(--line); border-radius: var(--r-md); background: #fff; text-align: left; cursor: pointer; color: var(--ink); }
.atCard b { font-size: .92rem; font-weight: 650; }
.atCard small { color: var(--muted); font-size: .8rem; }
.atCard[aria-pressed="true"] { border: 2px dashed var(--ink); background: var(--safran-soft); padding: 11.5px; }
.atCard[disabled] { opacity: .45; cursor: not-allowed; }
.atBig { display: flex; align-items: center; gap: 12px; margin: 6px 0 12px; font-weight: 600; }
.atBig .stepper input { width: 90px; font-size: 1.3rem; font-weight: 700; }
.atSizes { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin-bottom: 12px; }
.atSizeRow { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 6px 6px 14px; border: 1.5px solid var(--line); border-radius: var(--r-md); background: #fff; }
.atSizeRow.on { border-color: var(--ink); background: var(--safran-soft); }
.atSizeRow .stepper button { width: 36px; height: 36px; }
.atSizeRow .stepper input { width: 44px; }
.atRecap { display: grid; grid-template-columns: auto 1fr; gap: 8px 14px; margin: 0 0 12px; font-size: .92rem; }
.atRecap dt { color: var(--muted); font-size: .76rem; text-transform: uppercase; letter-spacing: .06em; font-weight: 700; padding-top: 2px; }
.atRecap dd { margin: 0; white-space: pre-line; }
.atDetails { margin: 8px 0 12px; font-size: .85rem; }
.atDetails summary { cursor: pointer; font-weight: 600; color: var(--ink); }
.atDetails pre { white-space: pre-wrap; font: .8rem/1.45 var(--font-body); background: #fff; border: 1px solid var(--line); border-radius: var(--r-md); padding: 10px; }
.atFavBig { margin-top: 6px; }
/* téléphone : aperçu en haut, réglages dessous */
@media (max-width: 760px) {
  .atBody { grid-template-columns: 1fr; grid-template-rows: minmax(0, 46vh) minmax(0, 1fr); }
  .at[data-step="creation"] .atBody { grid-template-rows: minmax(0, 52vh) minmax(0, 1fr); }
  .at[data-step="recap"] .atBody, .at[data-step="tailles"] .atBody, .at[data-step="projet"] .atBody, .at[data-step="quantite"] .atBody { grid-template-rows: minmax(0, 30vh) minmax(0, 1fr); }
  .atStage { margin: 0 10px 6px; }
  .atPanel { padding: 6px 14px 14px; }
  .atHead h2 { font-size: 1.1rem; }
  .atFoot .btn { min-width: 0; padding: 0 16px; }
}

/* ---------- favoris : mes créations */
.designs { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-top: 10px; }
@media (min-width: 720px) { .designs { grid-template-columns: repeat(4, 1fr); } }
.design { position: relative; background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.design a { display: block; text-decoration: none; color: var(--ink); padding-bottom: 10px; }
.design img { width: 100%; aspect-ratio: 1; object-fit: cover; background: #e4e7ee; }
.design strong { display: block; padding: 8px 10px 0; font-size: .9rem; }
.design small { display: block; padding: 0 10px; color: var(--muted); font-size: .76rem; }
.design-del { position: absolute; top: 8px; right: 8px; width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--line); background: rgba(255, 255, 255, .92); cursor: pointer; }

/* ---------- mouvements (rapides, coupés si l'appareil demande moins d'animations) */
@media (prefers-reduced-motion: no-preference) {
  @keyframes eurIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
  @keyframes eurUp { from { opacity: 0; transform: translateY(16px) scale(.985); } to { opacity: 1; transform: none; } }
  @keyframes stIn { from { opacity: 0; transform: translateX(22px); } to { opacity: 1; transform: none; } }
  @keyframes stBack { from { opacity: 0; transform: translateX(-22px); } to { opacity: 1; transform: none; } }
  @keyframes atOpen { from { opacity: .3; transform: translateY(6%); } to { opacity: 1; transform: none; } }
  @keyframes pop { 0% { transform: scale(1); } 40% { transform: scale(1.25); } 100% { transform: scale(1); } }
  main > .wrap { animation: eurIn .32s cubic-bezier(.2, .75, .25, 1) both; }
  .grid > *, .tiles > *, .designs > * { animation: eurUp .4s cubic-bezier(.2, .75, .25, 1) both; }
  .grid > :nth-child(2), .tiles > :nth-child(2), .designs > :nth-child(2) { animation-delay: .04s; }
  .grid > :nth-child(3), .tiles > :nth-child(3), .designs > :nth-child(3) { animation-delay: .08s; }
  .grid > :nth-child(4), .tiles > :nth-child(4), .designs > :nth-child(4) { animation-delay: .12s; }
  .grid > :nth-child(n+5), .tiles > :nth-child(n+5), .designs > :nth-child(n+5) { animation-delay: .16s; }
  html.eurWait main > .wrap, html.eurWait main > .wrap * { animation-play-state: paused !important; }
  .stIn { animation: stIn .3s cubic-bezier(.2, .75, .25, 1) both; }
  .stBack { animation: stBack .3s cubic-bezier(.2, .75, .25, 1) both; }
  .at { animation: atOpen .34s cubic-bezier(.2, .8, .2, 1) both; }
  .at.out { animation: atOpen .18s ease-in reverse both; }
  .atSw:active i, .atCard:active, .atAddBtn:active, .atEl:active, .atCta:active { transform: scale(.96); }
  .atCard, .atAddBtn, .atEl, .atCta { transition: transform .15s ease, background-color .2s, border-color .2s; }
  .atSw[aria-pressed="true"] i, .atHeart.pop, .atCard[aria-pressed="true"] { animation: pop .3s ease; }
  .atBub:not([hidden]) { animation: eurUp .18s ease both; }
  .atCta { animation: eurUp .45s cubic-bezier(.2, .75, .25, 1) .12s both; }
  .atCtaIco { animation: pop 1.2s ease 1.2s 2; }
}

/* prix selon la taille du flocage (26/11/2026) */
.atFmtRow { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin: 2px 0 8px; }
.atFmt { display: inline-block; padding: 3px 10px; border-radius: 999px; background: #eef0f4; color: var(--ink); font-size: .8rem; font-weight: 700; }
.atFmt.on { background: var(--safran-soft); box-shadow: inset 0 0 0 1.5px var(--safran); }
.atFmtRow small { font-size: .74rem; color: var(--muted); }
@media (prefers-reduced-motion: no-preference) { .atPrice b.bump { animation: atBump .38s cubic-bezier(.2,.8,.2,1); } @keyframes atBump { 0% { transform: scale(1); } 35% { transform: scale(1.12); color: #fff; } 100% { transform: scale(1); } } .atPrice b { transform-origin: left center; } }
.atFmtList { margin: 6px 0 0; padding-left: 18px; font-size: .84rem; }
.atFmtList li { margin: 2px 0; }
