/* L'atelier de coloriage en ligne. Chargée par la seule page de l'atelier, APRÈS maquette.css : rien ici ne pèse sur
   les pages catégories. Les couleurs, les polices et la mise en page du site (barre, pied, impression d'une feuille)
   viennent de maquette.css ; ce qui est propre à l'atelier porte les classes choix, miens, choisir, theme, feuillet,
   gestes, boites, effet, pour, reponses, atelier, volet, pastille et at-… (at-bouton, at-crayon : `bouton` et `crayon` existent déjà dans maquette.css, pour autre chose).
   Téléphone d'abord, tenu en portrait : la feuille prend l'écran, les crayons et les outils sont en bas. */
html { touch-action: manipulation; }
html:has(.atelier-ouvert) { overflow: hidden; overscroll-behavior: none; }
.choix *, .atelier * { box-sizing: border-box; }
.choix button, .atelier button { font: inherit; color: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; }
/* Rien ne clignote au toucher dans l'atelier : sans cela, un téléphone voile toute la scène à chaque coup de pot
   (elle porte `cursor: pointer` avec le pot, ce qui la lui fait prendre pour un bouton). */
.atelier, .atelier * { -webkit-tap-highlight-color: transparent; }
.choix [hidden], .atelier [hidden] { display: none !important; }

/* ---------- La page d'entrée : l'en-tête, « Mes coloriages », le choix du dessin, le mode d'emploi ----------
   Elle reprend la page catégorie : l'en-tête du site (.entete, .fil, .faits, .une__bouton de maquette.css), la largeur
   de 1440 px, les feuilles posées sur la table, les titres en Fraunces. Dans le choix, tout est en boutons posés par
   le script : la page ne porte ni vignette ni lien de dessin. */
html:has(.choix) { scroll-padding-top: calc(var(--h-bandeau) + 18px); }
.choix__dans { max-width: var(--largeur); margin: 0 auto; padding: 0 32px; }
.choix h2 { font-family: var(--titre); font-weight: 620; font-size: 30px; letter-spacing: -0.018em; line-height: 1.15; margin: 0; }
.choix h3, .choix h4 { font-family: var(--titre); font-weight: 620; letter-spacing: -0.012em; line-height: 1.2; margin: 0; }
.choix svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* L'en-tête : plus haut que celui d'une page catégorie, comme l'accueil. À droite, le dessin en cours de coloriage
   (une feuille un peu penchée) et six crayons de la boîte Classique. */
.entete--atelier .entete__dans { grid-template-columns: minmax(0, 1fr) 470px; min-height: 420px; padding-top: 36px; padding-bottom: 40px; }
.entete--atelier.entete--sans-image .entete__dans { grid-template-columns: minmax(0, 1fr); min-height: 0; }
.entete--atelier h1 { font-size: 60px; margin-bottom: 18px; }
.entete--atelier .faits { margin-bottom: 16px; font-size: 15.5px; }
.entete--atelier .entete__chapo { font-size: 19px; max-width: 54ch; }
.choix__entree { margin-top: 28px; gap: 12px 22px; }
.choix .une__bouton { border: 0; height: 52px; padding: 0 26px 0 20px; font-size: 17px; font-weight: 700; color: var(--papier); }
.choix .une__bouton svg { width: 21px; height: 21px; }
.choix__vers { display: inline-flex; align-items: center; gap: 7px; padding: 8px 2px; border: 0; background: none; font-size: 16px; font-weight: 700; text-decoration: underline; text-decoration-color: var(--teinte-vive); text-decoration-thickness: 2px; text-underline-offset: 4px; }
.choix__vers svg { width: 17px; height: 17px; transition: transform 0.15s ease; }
.choix__vers:hover svg { transform: translateY(3px); }
.choix__image { position: relative; align-self: stretch; margin: 0; min-height: 340px; }
.choix__image img { position: absolute; right: 5%; top: 50%; width: auto; height: 96%; max-height: 360px; aspect-ratio: 3 / 4; padding: 12px; background: #fff; border-radius: var(--rayon-feuille); box-shadow: 0 22px 34px -16px rgba(60, 20, 35, 0.5), 0 0 0 1px rgba(29, 26, 22, 0.1); transform: translateY(-50%) rotate(3deg); }
/* Sur le fond peint, la feuille est seule : le fond porte déjà ses crayons. Sans fond, six crayons en CSS. */
.entete--atelier.entete--heros .choix__image img { right: 30%; }
.choix__mines { position: absolute; left: 9%; bottom: 2%; display: flex; align-items: flex-end; gap: 5px; transform: rotate(-9deg); transform-origin: bottom left; filter: drop-shadow(0 6px 8px rgba(60, 20, 35, 0.28)); }
.choix__mines i { display: block; background: var(--c); clip-path: polygon(50% 0, 100% 30%, 100% 100%, 0 100%, 0 30%); }
.choix__mines i { width: 21px; height: 150px; border-radius: 0 0 3px 3px; }
.choix__mines i:nth-child(2) { height: 172px; }
.choix__mines i:nth-child(3) { height: 138px; }
.choix__mines i:nth-child(4) { height: 164px; }
.choix__mines i:nth-child(5) { height: 146px; }
.choix__mines i:nth-child(6) { height: 158px; }

/* Mes coloriages : un bandeau kraft sous l'en-tête, seulement quand l'appareil en garde. Une rangée qui défile de
   côté ; sous chaque feuille, un trait de crayon qui dit où on en est. */
.miens__liste { display: flex; gap: 20px; margin: 0 -32px; padding: 4px 32px 8px; list-style: none; overflow-x: auto; scrollbar-width: thin; }
.miens__liste li { flex: none; width: 140px; }

/* Le choix : son titre et le champ sur une ligne, puis le corps que le script remplit. */
.choisir { padding-top: 44px; }
.choisir__tete { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 32px; margin-bottom: 8px; }
.choisir__champ { flex: 1; max-width: 440px; }
.choisir__champ input { height: 48px; padding-left: 46px; font-size: 16px; border-color: var(--encre); }
.choisir__champ svg { top: 15px; stroke-width: 2; }
.choisir__corps { min-height: 420px; }
.choix .choisir__titre { margin: 30px 0 16px; font-size: 22px; }
.choisir__rien, .choix__panne { margin: 30px 0 0; color: var(--encre-douce); }

/* Un thème : sa couverture, son nom, son compte. La carte des rayons de l'accueil, en bouton. */
.themes { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px var(--entre-dessins); margin: 0; padding: 0; list-style: none; }
.theme { display: block; width: 100%; padding: 0; border: 0; background: none; text-align: left; line-height: 1.25; }
.theme__image { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; border-radius: 12px; background: var(--teinte); box-shadow: 0 0 0 1px rgba(29, 26, 22, 0.07); transition: transform 0.25s ease, box-shadow 0.25s ease; }
.theme strong { display: block; margin-top: 12px; font-family: var(--titre); font-size: 20px; font-weight: 620; letter-spacing: -0.01em; transition: color 0.15s ease; }
.theme__compte { display: block; margin-top: 3px; font-size: 14.5px; font-weight: 400; color: var(--encre-douce); white-space: nowrap; }
.theme:hover .theme__image { transform: translateY(-3px); box-shadow: 0 0 0 1px rgba(29, 26, 22, 0.1), 0 16px 24px -14px rgba(29, 26, 22, 0.42); }
.theme:hover strong { color: var(--coquelicot-fonce); }

/* Les dessins d'un thème : le retour aux thèmes, le nom, les sections en pastilles, puis une planche par section. */
.choisir__theme { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; margin: 22px 0 16px; }
.choix .choisir__theme h3 { font-size: 28px; }
.choisir__theme .theme__compte { margin: 4px 0 0; }
.choisir__imprimer { display: inline-flex; align-items: center; gap: 7px; margin-left: auto; font-size: 15px; font-weight: 700; color: var(--encre); text-decoration: underline; text-underline-offset: 3px; }
.choisir__imprimer svg { flex: none; width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.choisir__retour, .choisir__suivant { display: inline-flex; align-items: center; gap: 8px; padding: 7px 16px 7px 12px; border: var(--filet) solid var(--encre); border-radius: 999px; background: none; font-size: 14.5px; font-weight: 700; line-height: 1.3; white-space: nowrap; transition: background 0.15s ease, color 0.15s ease; }
.choisir__suivant { padding: 7px 12px 7px 16px; white-space: normal; text-align: left; }
.choisir__retour svg, .choisir__suivant svg { flex: none; width: 16px; height: 16px; stroke-width: 2.2; }
.choix .choisir__retour:hover, .choix .choisir__suivant:hover { background: var(--encre); color: var(--papier); }
.choisir__sections { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 6px; }
.pastille-mot { padding: 6px 13px; border: var(--filet) solid var(--trait-fort); border-radius: 999px; background: var(--feuille); font-size: 14px; font-weight: 600; line-height: 1.3; white-space: nowrap; transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease; }
.pastille-mot:hover { border-color: var(--encre); }
.niveaux { display: inline-flex; gap: 4px; max-width: 100%; padding: 4px; border-radius: 999px; background: var(--kraft); }
.niveaux button { display: inline-flex; align-items: center; gap: 8px; padding: 8px 18px; border: 0; border-radius: 999px; background: none; font-size: 15.5px; font-weight: 700; line-height: 1.3; white-space: nowrap; transition: background 0.12s ease, color 0.12s ease; }
.niveaux button:hover { background: rgba(255, 255, 255, 0.6); }
.choix .niveaux button[aria-pressed='true'] { background: var(--encre); color: var(--papier); }
.niveaux i { flex: none; width: 10px; height: 10px; border-radius: 50%; background: #5fa35a; }
.niveaux i[data-niveau='1'] { background: #e0a030; }
.niveaux i[data-niveau='2'] { background: #b06aa8; }
.niveau__suite { display: flex; justify-content: center; margin: 32px 0 0; }
.choix .choisir__section h4 { margin: 34px 0 16px; font-size: 22px; }
.choisir__section:only-of-type { margin-top: 26px; }
.choisir__suite { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin: 44px 0 0; padding-top: 24px; border-top: 1px solid var(--trait); }

/* Un dessin : une feuille posée sur la table, comme sur les pages catégories ; au survol, le mot « Colorier ». */
.feuillets { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 30px var(--entre-dessins); margin: 0; padding: 0; list-style: none; }
.feuillet { position: relative; display: block; width: 100%; padding: 0; border: 0; background: none; text-align: left; }
.feuillet__papier { position: relative; display: block; aspect-ratio: 210 / 297; padding: 4.5%; background: var(--feuille); border-radius: var(--rayon-feuille); box-shadow: var(--ombre-feuille), inset 0 0 0 1px var(--trait); transition: transform 0.2s ease, box-shadow 0.2s ease; }
.feuillet__papier img { display: block; width: 100%; height: 100%; object-fit: contain; }
.feuillet:hover .feuillet__papier { transform: translateY(-4px) rotate(-0.7deg); box-shadow: var(--ombre-levee), inset 0 0 0 1px var(--trait-fort); }
.feuillet__geste { position: absolute; top: 8px; right: 8px; padding: 3px 10px; border-radius: 999px; background: var(--encre); color: var(--papier); font-size: 12px; font-style: normal; font-weight: 700; letter-spacing: 0.03em; line-height: 1.4; opacity: 0; transform: translateY(-2px); transition: opacity 0.15s ease, transform 0.15s ease; pointer-events: none; }
.feuillet__geste::after { content: var(--geste); }
.feuillet:hover .feuillet__geste, .feuillet:focus-visible .feuillet__geste { opacity: 1; transform: none; }
@media (hover: none) { .feuillet__geste { display: none; } }
.feuillet__nom { display: block; margin-top: 11px; font-size: 15px; font-weight: 600; line-height: 1.3; }
/* Le niveau : un point de couleur (vert, ambre, prune) et deux mots. */
.feuillet__niveau { display: flex; align-items: center; gap: 6px; margin-top: 3px; font-size: 13px; color: var(--encre-douce); }
.feuillet__niveau i { flex: none; width: 8px; height: 8px; border-radius: 50%; background: #5fa35a; }
.feuillet__niveau[data-niveau='1'] i { background: #e0a030; }
.feuillet__niveau[data-niveau='2'] i { background: #8e4a86; }
.feuillet__theme { display: block; margin-top: 2px; font-size: 13.5px; color: var(--encre-douce); }
/* Un de mes coloriages : la feuille entière, son avancement, et une coche verte quand tout est colorié. */
.feuillet--mien .feuillet__papier { aspect-ratio: 300 / 424; padding: 0; overflow: hidden; }
.feuillet--mien .feuillet__papier img { object-fit: cover; }
.feuillet__avance { display: block; height: 5px; margin-top: 10px; border-radius: 999px; background: linear-gradient(90deg, var(--teinte-vive) calc(var(--p, 0) * 100%), var(--trait-fort) 0); }
.feuillet--mien .feuillet__nom { margin-top: 8px; font-size: 14.5px; }
.feuillet--fini .feuillet__avance { background: #2e7d32; }
.feuillet--fini::after { content: ''; position: absolute; right: 8px; top: 8px; width: 26px; height: 26px; border-radius: 50%; background: #2e7d32 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6.5 12.5 3.6 3.6 7.4-8'/%3E%3C/svg%3E") center / 18px no-repeat; box-shadow: 0 0 0 2px #fff; }

/* Sous le choix, ce qui se lit : le mode d'emploi, les crayons, pour qui, les réponses. Au trait, sur le papier. */
.choix__lire { padding-top: 72px; padding-bottom: 88px; }
.choix__lire > section + section { margin-top: 64px; }
.choix__lire > section:first-child { padding-top: 44px; border-top: 1px solid var(--trait); }
.choix__lire p { margin: 0; color: var(--encre-douce); }
.gestes__liste { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--entre-dessins); margin: 24px 0 0; padding: 0; list-style: none; counter-reset: geste; }
.gestes__liste li { position: relative; padding: 24px 24px 26px; border: var(--filet) solid var(--trait-fort); border-radius: var(--rayon-carte); background: var(--feuille); counter-increment: geste; }
.gestes__liste li::before { content: counter(geste); position: absolute; right: 22px; top: 12px; font-family: var(--titre); font-weight: 620; font-size: 54px; line-height: 1; color: var(--teinte-claire); }
.gestes__icone { display: grid; place-items: center; width: 54px; height: 54px; border-radius: 50%; background: var(--teinte); color: var(--teinte-forte); }
.gestes__icone svg { width: 27px; height: 27px; stroke-width: 1.9; }
.choix .gestes__liste h3 { margin: 18px 0 6px; font-size: 22px; }
.boites__tete p { margin-top: 10px; max-width: 74ch; }
.boites__liste { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px var(--entre-dessins); margin: 24px 0 0; padding: 0; list-style: none; }
.boites__liste li { padding: 18px 18px 14px; border: var(--filet) solid var(--trait-fort); border-radius: var(--rayon-carte); background: var(--feuille); }
/* Les mêmes pastilles que dans l'outil, en petit. */
.boites__mines { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 7px 5px; }
.boites__mines i { display: block; aspect-ratio: 1; border-radius: 50%; background: var(--c); box-shadow: inset 0 0 0 1px rgba(29, 26, 22, 0.2); }
.boites__liste strong { display: block; margin-top: 12px; font-family: var(--titre); font-size: 18.5px; font-weight: 620; letter-spacing: -0.01em; }
.choix__lire .boites__mot { margin-top: 30px; color: var(--encre); font-weight: 600; }
.effets { display: flex; flex-wrap: wrap; gap: 12px 26px; margin: 14px 0 0; padding: 0; list-style: none; font-weight: 600; }
.effets li { display: inline-flex; align-items: center; gap: 10px; }
.effet { flex: none; width: 34px; height: 34px; border-radius: 50%; box-shadow: 0 0 0 1.5px var(--trait-fort); background-color: #f06292; }
.effet--crayon { background-image: repeating-linear-gradient(118deg, rgba(255, 255, 255, 0.34) 0 1px, transparent 1px 3px), repeating-linear-gradient(64deg, rgba(255, 255, 255, 0.2) 0 1px, transparent 1px 4px); }
.effet--degrade { background-image: linear-gradient(135deg, #f06292, #fdd835); }
.effet--arcenciel { background-image: linear-gradient(135deg, #e53935, #fb8c00, #fdd835, #8bc34a, #4fc3f7, #7b1fa2); }
.effet--paillettes { background-image: radial-gradient(circle at 22% 30%, #fff 0 1.4px, transparent 1.8px), radial-gradient(circle at 64% 18%, #fff 0 1px, transparent 1.4px), radial-gradient(circle at 78% 60%, #fff 0 1.6px, transparent 2px), radial-gradient(circle at 38% 72%, #fff 0 1.1px, transparent 1.5px), radial-gradient(circle at 52% 46%, #ffe27a 0 1.5px, transparent 1.9px), radial-gradient(circle at 16% 62%, #ffe27a 0 1px, transparent 1.4px); }
.effet--pois { background-image: radial-gradient(circle, #fff 0 2.4px, transparent 2.9px); background-size: 10px 10px; }
.effet--rayures { background-image: repeating-linear-gradient(45deg, #fff 0 3px, transparent 3px 9px); }
.pour__blocs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 56px; margin-top: 22px; }
.choix .pour__blocs h3 { margin-bottom: 8px; font-size: 21px; }
.reponses__liste { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 56px; margin: 20px 0 0; }
.reponses__liste div { padding: 18px 0 20px; border-top: 1px solid var(--trait); }
.reponses__liste dt { font-family: var(--titre); font-size: 19px; font-weight: 620; letter-spacing: -0.01em; line-height: 1.25; }
.reponses__liste dd { margin: 6px 0 0; color: var(--encre-douce); }

@media (max-width: 1320px) {
  .entete--atelier .entete__dans { grid-template-columns: minmax(0, 1fr) 400px; min-height: 380px; }
  .entete--atelier h1 { font-size: 52px; }
  .feuillets { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}
@media (max-width: 1100px) {
  .themes { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .feuillets { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .boites__liste { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
/* Sous 900 px, comme sur les autres pages : l'en-tête garde son texte, sans son image. */
@media (max-width: 900px) {
  .entete--atelier .entete__dans { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .choix__image { display: none; }
  /* Sans la feuille, le fond se cadre sur ses crayons, sous le voile. */
  .entete--atelier .entete__fond { object-position: 74% 50%; }
  .gestes__liste { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .gestes__liste li { display: grid; grid-template-columns: 54px minmax(0, 1fr); column-gap: 16px; padding: 18px 18px 20px; }
  .gestes__icone { grid-row: span 2; }
  .choix .gestes__liste h3 { margin: 2px 34px 4px 0; font-size: 20px; }
  .gestes__liste li::before { right: 16px; top: 12px; font-size: 34px; }
}
@media (max-width: 760px) {
  .choix__dans { padding: 0 16px; }
  .choix h2 { font-size: 24px; }
  .entete--atelier .entete__dans { padding: 18px 16px 24px; }
  .entete--atelier h1 { font-size: 36px; margin-bottom: 12px; }
  .entete--atelier .faits { font-size: 13.5px; margin-bottom: 12px; }
  .entete--atelier .entete__chapo { font-size: 16.5px; }
  .choix__entree { margin-top: 20px; }
  .choix .une__bouton { height: 50px; font-size: 16.5px; }
  .miens__liste { gap: 14px; margin: 0 -16px; padding: 4px 16px 8px; scrollbar-width: none; }
  .miens__liste::-webkit-scrollbar { display: none; }
  .miens__liste li { width: 112px; }
  .choisir { padding-top: 30px; }
  .choisir__champ { flex: none; width: 100%; max-width: none; }
  .choisir__corps { min-height: 300px; }
  .choix .choisir__titre { margin: 24px 0 12px; font-size: 19px; }
  .themes { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 14px; }
  .theme__image { border-radius: 9px; }
  .theme strong { margin-top: 9px; font-size: 16.5px; }
  .theme__compte { font-size: 13.5px; }
  .choisir__theme { margin: 18px 0 12px; gap: 8px 12px; }
  .choix .choisir__theme h3 { order: 2; width: 100%; font-size: 24px; }
  .choisir__theme .theme__compte { order: 3; margin: -4px 0 0; }
  .choisir__imprimer { order: 4; width: 100%; margin: 0; font-size: 14.5px; }
  /* Les sections défilent sur une ligne au lieu d'empiler trois rangées. */
  .choisir__sections { flex-wrap: nowrap; overflow-x: auto; margin: 0 -16px; padding: 2px 16px 8px; scrollbar-width: none; }
  .choisir__sections::-webkit-scrollbar { display: none; }
  .niveaux { display: flex; }
  .niveaux button { flex: 1; justify-content: center; gap: 6px; padding: 8px 6px; font-size: 14.5px; }
  .choix .choisir__section h4 { margin: 26px 0 12px; font-size: 19px; }
  .feuillets { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 14px; }
  .feuillet__nom { margin-top: 9px; font-size: 14.5px; }
  .choix__lire { padding-top: 48px; padding-bottom: 56px; }
  .choix__lire > section + section { margin-top: 46px; }
  .choix__lire > section:first-child { padding-top: 32px; }
  .boites__liste { gap: 12px; }
  .boites__liste li { padding: 12px 10px 10px; }
  .boites__mines { gap: 5px 3px; }
  .boites__liste strong { margin-top: 9px; font-size: 16px; }
  .effets { gap: 10px 18px; font-size: 15px; }
  .effet { width: 30px; height: 30px; }
  .pour__blocs, .reponses__liste { grid-template-columns: minmax(0, 1fr); }
  .choix .pour__blocs h3 { font-size: 19.5px; }
  .reponses__liste dt { font-size: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  .theme__image, .feuillet__papier, .feuillet__geste, .choix__vers svg { transition: none; }
  .feuillet:hover .feuillet__papier, .theme:hover .theme__image { transform: none; }
}

/* ---------- L'atelier ---------- */
.atelier { display: none; font-family: var(--texte, 'Figtree', system-ui, sans-serif); font-size: 16px; line-height: 1.5; color: var(--encre); }
.atelier-ouvert { overflow: hidden; overscroll-behavior: none; }
.atelier-ouvert .atelier { position: fixed; inset: 0; z-index: 100; display: grid; grid-template: 'barre' auto 'scene' minmax(0, 1fr) 'crayons' auto 'outils' auto / minmax(0, 1fr); height: 100dvh; background: var(--kraft); user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }

.atelier__barre { grid-area: barre; display: flex; align-items: center; gap: 6px; padding: 6px 8px; background: var(--papier); border-bottom: 1.5px solid var(--trait); }
.atelier__nom { flex: 1; min-width: 0; margin: 0; font-family: 'Fraunces', Georgia, serif; font-weight: 620; font-size: 17px; letter-spacing: -0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* La jauge : un anneau qui se ferme à mesure qu'on colorie, sans chiffre. Un toucher montre ce qui reste. */
.atelier__jauge { flex: none; position: relative; width: 34px; height: 34px; padding: 0; border: 0; border-radius: 50%; background: conic-gradient(var(--encre) calc(var(--p, 0) * 1turn), var(--trait-fort) 0); transition: transform 0.12s ease; }
.atelier__jauge::before { content: ''; position: absolute; inset: 5px; border-radius: 50%; background: var(--papier); }
.atelier__jauge:hover { transform: scale(1.08); }
.atelier__jauge svg { position: relative; display: none; width: 20px; height: 20px; margin: 7px; fill: none; stroke: var(--papier); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.atelier__jauge[data-fini='true'] { background: #2e7d32; }
.atelier__jauge[data-fini='true']::before { display: none; }
.atelier__jauge[data-fini='true'] svg { display: block; }

.at-bouton { flex: none; display: inline-grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 1.5px solid transparent; border-radius: 12px; background: none; text-decoration: none; color: var(--encre); transition: background 0.12s ease, border-color 0.12s ease, opacity 0.12s ease; }
.at-bouton svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.at-bouton:hover { background: var(--kraft); }
.at-bouton:disabled { opacity: 0.3; cursor: default; background: none; }
.at-bouton[aria-pressed='true'] { background: var(--encre); color: var(--papier); }

.atelier__scene { grid-area: scene; position: relative; overflow: hidden; touch-action: none; cursor: crosshair; }
.atelier__scene[data-mode='pot'] { cursor: pointer; }
/* Le rond du pinceau tient lieu de curseur (voir colorier.js) : un cercle sombre doublé de clair, lisible sur tout. */
@media (hover: hover) and (pointer: fine) { .atelier__scene[data-mode='pinceau'], .atelier__scene[data-mode='gomme'] { cursor: none; } }
.atelier__rond { position: absolute; left: 0; top: 0; border: 1.5px solid var(--encre); border-radius: 50%; box-shadow: 0 0 0 1.5px rgba(255, 255, 255, 0.85), inset 0 0 0 1.5px rgba(255, 255, 255, 0.85); pointer-events: none; will-change: transform; }
.atelier__scene--attente::after { content: ''; position: absolute; left: 50%; top: 50%; width: 34px; height: 34px; margin: -17px; border: 3px solid var(--trait-fort); border-top-color: var(--encre); border-radius: 50%; animation: tourne 0.8s linear infinite; }
@keyframes tourne { to { transform: rotate(1turn); } }
/* La feuille : la peinture dessous, le trait par-dessus, en produit. Sa taille est celle de la carte des zones ;
   c'est la transformation qui la met à l'échelle de l'écran. */
.atelier__feuille { position: absolute; left: 0; top: 0; transform-origin: 0 0; background: #fff; isolation: isolate; box-shadow: 0 1px 0 var(--trait-fort), 0 10px 30px rgba(60, 40, 10, 0.14); will-change: transform; }
.atelier__peinture, .atelier__trait { position: absolute; inset: 0; display: block; width: 100%; height: 100%; pointer-events: none; }
.atelier__trait { mix-blend-mode: multiply; -webkit-user-drag: none; }
.atelier__recadrer { position: absolute; right: 10px; top: 10px; background: var(--papier); border-color: var(--trait-fort); }
.atelier__panne { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(90%, 30em); margin: 0; padding: 16px 20px; border: 1.5px solid var(--trait-fort); border-radius: 14px; background: var(--papier); font-weight: 600; text-align: center; user-select: text; -webkit-user-select: text; overflow-wrap: anywhere; }
.atelier__bravo { position: absolute; left: 50%; top: 18px; transform: translateX(-50%); margin: 0; padding: 10px 20px; border-radius: 999px; background: var(--encre); color: var(--papier); font-weight: 700; white-space: nowrap; animation: saute 0.5s cubic-bezier(0.3, 1.6, 0.5, 1); }
@keyframes saute { from { transform: translateX(-50%) scale(0.6); opacity: 0; } }

/* Les couleurs : vingt-quatre pastilles de peinture, toujours toutes visibles. Douze par rangée sur un téléphone. */
.atelier__boite { grid-area: crayons; background: var(--papier); border-top: 1.5px solid var(--trait); }
/* Le nom de la boîte de crayons, entre deux flèches qui passent à la précédente et à la suivante. */
.atelier__palette { display: flex; align-items: center; justify-content: center; gap: 2px; padding-top: 3px; }
.atelier__palette .at-bouton { width: 40px; height: 30px; border-radius: 9px; }
.atelier__palette .at-bouton svg { width: 18px; height: 18px; }
.atelier__palette-nom { min-width: 150px; font-size: 13.5px; font-weight: 700; text-align: center; white-space: nowrap; }
.atelier__crayons { display: grid; grid-template-columns: repeat(12, minmax(0, 34px)); justify-content: center; gap: 7px 5px; padding: 9px 10px 7px; }
/* Sur un téléphone, douze par rangée donnent des pastilles de 24 px : trop peu pour un doigt d'enfant. Huit par
   rangée, sur trois rangées : la boîte prend une rangée de plus, que la feuille (limitée par la largeur) ne perd pas. */
@media (max-width: 520px) { .atelier__crayons { grid-template-columns: repeat(8, minmax(0, 38px)); gap: 7px 6px; } }
/* Une pastille : un rond de la couleur, cerné d'un filet (il fait exister le blanc et le jaune pâle sur le papier),
   avec un reflet en haut à gauche. Celle qu'on tient porte un anneau à l'encre, détaché par un liseré de papier. */
.at-crayon { position: relative; width: 100%; aspect-ratio: 1; padding: 0; border: 0; border-radius: 50%; background: var(--c); box-shadow: inset 0 0 0 1px rgba(29, 26, 22, 0.22); transition: transform 0.12s ease, box-shadow 0.12s ease; }
.at-crayon::after { content: ''; position: absolute; left: 20%; top: 15%; width: 34%; height: 19%; border-radius: 50%; background: rgba(255, 255, 255, 0.45); transform: rotate(-25deg); }
.at-crayon[aria-pressed='true'] { transform: scale(1.1); box-shadow: inset 0 0 0 1px rgba(29, 26, 22, 0.22), 0 0 0 2px var(--papier), 0 0 0 4px var(--encre); }

.atelier__outils { grid-area: outils; display: flex; align-items: center; justify-content: center; gap: 5px; padding: 4px 6px calc(8px + env(safe-area-inset-bottom)); background: var(--papier); }
.atelier__outils .at-bouton { width: 50px; height: 48px; border-color: var(--trait-fort); }
.atelier__outils .at-bouton[aria-pressed='true'] { border-color: var(--encre); }
.atelier__filet { flex: none; width: 1.5px; height: 28px; margin: 0 3px; background: var(--trait); }
/* Ce qui reste à colorier : une toile par-dessus tout, invisible, qui clignote quand on touche la jauge. */
.atelier__reste { position: absolute; inset: 0; display: block; width: 100%; height: 100%; pointer-events: none; opacity: 0; }
.atelier__reste--clignote { animation: clignote 2s ease-in-out; }
@keyframes clignote { 0%, 100% { opacity: 0; } 12%, 50%, 86% { opacity: 0.7; } 31%, 68% { opacity: 0.15; } }

/* Le volet des effets et les tailles flottent au bas de la scène, sans prendre de place à la feuille. */
.atelier__volets { grid-area: scene; align-self: end; z-index: 2; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 8px; pointer-events: none; }
.atelier__volets > * { pointer-events: auto; }
/* Les trois tailles du pinceau et de la gomme : dans la rangée des outils, jamais par-dessus le dessin. Avec le pot,
   elles s'effacent sans libérer leur place, pour que les outils ne bougent pas sous le doigt. */
.atelier__tailles { display: flex; gap: 2px; padding: 3px; border: 1.5px solid var(--trait-fort); border-radius: 14px; background: var(--papier); }
.atelier__tailles[hidden] { display: flex; visibility: hidden; }
.atelier__outils .atelier__tailles .at-bouton { width: 34px; height: 38px; border: 0; border-radius: 10px; }
@media (max-width: 350px) { .atelier__outils .atelier__tailles .at-bouton { width: 28px; } .atelier__outils > .at-bouton { width: 44px; } }
.atelier__tailles .at-bouton[aria-pressed='true'] { background: var(--teinte); color: var(--encre); }
.atelier__tailles i { display: block; border-radius: 50%; background: currentColor; }
.volet { align-self: stretch; max-width: 430px; margin: 0; padding: 12px; border: 1.5px solid var(--trait-fort); border-radius: 16px; background: var(--papier); box-shadow: 0 10px 30px rgba(60, 40, 10, 0.16); user-select: text; -webkit-user-select: text; }
.volet__grille { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px 4px; }
.pastille { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 4px 2px; border: 1.5px solid transparent; border-radius: 12px; background: none; font-size: 12px; font-weight: 600; line-height: 1.2; }
.pastille canvas { display: block; width: 48px; height: 48px; }
.pastille:hover { background: var(--kraft); }
.pastille[aria-pressed='true'] { border-color: var(--encre); background: var(--feuille); }
.volet__mot { margin: 10px 2px 0; font-size: 13px; line-height: 1.35; color: var(--encre-douce); }
.volet__couleur { display: flex; align-items: center; gap: 10px; margin: 10px 2px 0; font-size: 14px; font-weight: 600; cursor: pointer; }
.volet__couleur input { width: 40px; height: 32px; padding: 0; border: 1.5px solid var(--trait-fort); border-radius: 8px; background: none; cursor: pointer; }

/* Le volet de fin : imprimer, enregistrer, recommencer. */
.volet--fin { display: flex; flex-direction: column; gap: 4px; padding: 8px; }
.volet__geste { display: flex; align-items: center; gap: 12px; width: 100%; padding: 11px 12px; border: 0; border-radius: 11px; background: none; font-size: 15.5px; font-weight: 600; line-height: 1.3; text-align: left; text-decoration: none; color: var(--encre); }
.atelier__lien-page { margin-top: 4px; padding-top: 14px; border-top: 1.5px solid var(--trait); border-radius: 0 0 11px 11px; }
.volet__geste:hover { background: var(--kraft); }
.atelier__garder[aria-pressed='true'] svg { fill: var(--coquelicot); stroke: var(--coquelicot); }
.volet__geste svg { flex: none; width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Écran large : les outils à gauche, les crayons à droite ---------- */
@media (min-width: 900px) and (min-height: 560px) {
  .atelier-ouvert .atelier { grid-template: 'barre barre barre' auto 'outils scene crayons' minmax(0, 1fr) / auto minmax(0, 1fr) auto; }
  .atelier__barre { padding: 8px 14px; gap: 10px; }
  .atelier__nom { font-size: 20px; }
  .atelier__outils { flex-direction: column; justify-content: flex-start; gap: 6px; padding: 14px 12px; border-right: 1.5px solid var(--trait); }
  .atelier__tailles { flex-direction: column; }
  .atelier__outils .atelier__tailles .at-bouton { width: 40px; height: 36px; }
  .atelier__filet { width: 28px; height: 1.5px; margin: 4px 0; }
  .atelier__volets { align-self: start; padding: 12px; }
  .volet { align-self: flex-start; width: 330px; }
  .volet--fin { align-self: flex-end; width: 280px; }
  .atelier__boite { border-top: 0; border-left: 1.5px solid var(--trait); }
  .atelier__palette { padding: 12px 6px 0; }
  .atelier__palette .at-bouton { width: 30px; }
  .atelier__palette-nom { flex: 1; min-width: 0; white-space: normal; line-height: 1.2; }
  .atelier__crayons { grid-template-columns: repeat(4, 36px); align-content: start; gap: 12px 10px; padding: 16px 16px 20px; }
}
@media (prefers-reduced-motion: reduce) { .at-crayon, .at-bouton, .atelier__bravo { transition: none; animation: none; } }

/* ---------- Le choix : une grille, deux filtres (18 novembre 2026) ---------- */
.reprendre [hidden], .filtres [hidden], .raccourcis[hidden] { display: none !important; }
.reprendre__tout svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; vertical-align: -3px; }
.feuille__champ input:focus-visible { outline: 2px solid var(--encre); outline-offset: 1px; }
/* « Reprendre » : un seul bandeau pour Mes coloriages et Mes favoris, en deux onglets. */
.reprendre { padding: 20px 0 22px; background: var(--kraft); border-bottom: 1px solid var(--trait); }
.reprendre__onglets { display: flex; gap: 22px; margin: 0 0 16px; border-bottom: 1.5px solid var(--trait); }
.reprendre__onglets button { position: relative; white-space: nowrap; padding: 0 0 10px; border: 0; background: none; font-family: var(--titre); font-size: 21px; font-weight: 620; letter-spacing: -0.012em; color: var(--encre-douce); }
.reprendre__onglets button[aria-selected='true'] { color: var(--encre); }
.reprendre__onglets button[aria-selected='true']::after { content: ''; position: absolute; left: 0; right: 0; bottom: -1.5px; height: 3px; border-radius: 3px; background: var(--encre); }
.reprendre__tout { margin-left: auto; align-self: center; padding: 0 0 10px; border: 0; background: none; font-size: 14.5px; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.reprendre .miens__liste li { width: 124px; }

/* Les deux filtres : ils restent sous la barre quand on fait défiler la grille. */
.filtres { position: sticky; top: var(--h-bandeau); z-index: 12; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin: 16px -32px 0; padding: 12px 32px; background: rgba(250, 246, 238, 0.96); backdrop-filter: blur(8px); border-bottom: 1px solid transparent; }
.filtres--colle { border-bottom-color: var(--trait); }
.filtre-theme { display: inline-flex; align-items: center; gap: 10px; min-width: 0; height: 46px; padding: 0 14px 0 16px; border: var(--filet) solid var(--encre); border-radius: 999px; background: var(--feuille); font-size: 15.5px; line-height: 1.2; }
.filtre-theme small { font-size: 13px; font-weight: 600; color: var(--encre-douce); }
.filtre-theme strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; }
.filtre-theme svg { flex: none; margin-left: auto; width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.filtre-theme:hover { background: var(--kraft); }
.filtre-efface { display: inline-grid; place-items: center; width: 38px; height: 38px; margin-left: -6px; border: 0; border-radius: 50%; background: none; }
.filtre-efface:hover { background: var(--kraft); }
.filtre-efface svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
.filtres .niveaux { margin-left: auto; }
.niveaux button[disabled] { opacity: 0.38; cursor: default; }
.niveaux button[disabled]:hover { background: none; }

/* À l'entrée seulement : quelques thèmes choisis à la main, et la porte vers tous les autres. */
.raccourcis { display: flex; flex-wrap: wrap; gap: 7px; margin: 18px 0 0; }
.raccourcis .pastille-mot { padding: 8px 15px; font-size: 15px; }
.raccourcis .pastille-mot--tous { border-color: var(--encre); font-weight: 700; }

.resultat { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 18px; margin: 22px 0 18px; }
.choix .resultat h3 { font-size: 26px; }
.resultat p { margin: 0; font-size: 15px; color: var(--encre-douce); }
.resultat .choisir__imprimer { align-self: center; }
.rien { margin: 30px 0 0; padding: 26px; border-radius: 16px; background: var(--kraft); }
.rien p { margin: 0 0 14px; }
.resultat__themes { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; margin: 0 0 22px; font-size: 14.5px; color: var(--encre-douce); }

/* La liste des thèmes : une feuille qui monte du bas sur un téléphone, une fenêtre sur un ordinateur. */
dialog.feuille { width: min(760px, calc(100vw - 32px)); max-height: min(82vh, 760px); padding: 0; border: 0; border-radius: 22px; background: var(--papier); color: var(--encre); box-shadow: 0 30px 80px -20px rgba(29, 26, 22, 0.5); overflow: hidden; }
dialog.feuille[open] { display: flex; flex-direction: column; }
dialog.feuille::backdrop { background: rgba(29, 26, 22, 0.45); }
.feuille__tete { flex: none; padding: 18px 22px 14px; border-bottom: 1px solid var(--trait); }
.feuille__titre { display: flex; align-items: center; justify-content: space-between; margin: 0 0 12px; }
.feuille__titre h3 { margin: 0; font-family: var(--titre); font-size: 24px; font-weight: 620; letter-spacing: -0.012em; }
.feuille__fermer { display: inline-grid; place-items: center; width: 40px; height: 40px; margin-right: -8px; border: 0; border-radius: 50%; background: none; cursor: pointer; color: inherit; }
.feuille__fermer:hover { background: var(--kraft); }
.feuille__fermer svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
.feuille__champ { position: relative; }
.feuille__champ svg { position: absolute; left: 14px; top: 13px; width: 18px; height: 18px; fill: none; stroke: var(--encre-douce); stroke-width: 2; stroke-linecap: round; }
.feuille__champ input { width: 100%; height: 44px; padding: 0 14px 0 42px; border: var(--filet) solid var(--trait-fort); border-radius: 999px; background: var(--feuille); font: inherit; font-size: 16px; color: inherit; }
.feuille__corps { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 8px 22px 22px; }
.feuille__groupe h4 { margin: 20px 0 8px; font-family: var(--texte); font-size: 12.5px; font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase; color: var(--encre-douce); }
.feuille__themes { display: grid; grid-template-columns: repeat(auto-fill, minmax(215px, 1fr)); gap: 2px 14px; margin: 0; padding: 0; list-style: none; }
.feuille__theme { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; width: 100%; padding: 10px 12px; border: 0; border-radius: 10px; background: none; font: inherit; font-size: 16px; font-weight: 600; text-align: left; color: inherit; cursor: pointer; }
.feuille__theme:hover { background: var(--kraft); }
.feuille__theme[aria-current='true'] { background: var(--encre); color: var(--papier); }
.feuille__theme--vide { opacity: 0.45; }
.feuille__theme--tous { margin-top: 10px; border: var(--filet) solid var(--trait-fort); }
.feuille__rien { margin: 24px 0 0; color: var(--encre-douce); }

@media (max-width: 760px) {
  .reprendre { padding: 14px 0 16px; }
  .reprendre__onglets { gap: 16px; margin-bottom: 12px; }
  .reprendre__onglets button { font-size: 17px; }
  .reprendre__onglets .reprendre__tout { font-size: 13.5px; }
  .reprendre .miens__liste li { width: 104px; }
  .filtres { margin: 12px -16px 0; padding: 10px 16px; gap: 8px; }
  .filtre-theme { flex: 1; height: 44px; font-size: 15px; }
  .filtres .niveaux { margin-left: 0; width: 100%; }
  .raccourcis { flex-wrap: nowrap; overflow-x: auto; margin: 14px -16px 0; padding: 2px 16px 6px; scrollbar-width: none; }
  .raccourcis::-webkit-scrollbar { display: none; }
  .raccourcis .pastille-mot { padding: 7px 13px; font-size: 14.5px; }
  .resultat { margin: 16px 0 14px; }
  .choix .resultat h3 { font-size: 22px; width: 100%; }
  .resultat p { font-size: 14px; }
  dialog.feuille { width: 100vw; max-width: 100vw; max-height: 86dvh; margin: auto 0 0; border-radius: 22px 22px 0 0; }
  .feuille__tete { padding: 14px 16px 12px; }
  .feuille__corps { padding: 4px 16px 20px; }
  .feuille__themes { grid-template-columns: 1fr; }
  .feuille__theme { padding: 12px 10px; }
}
