/* Créations des membres — charte ambre #f2a842 (idem gate/commentaires). */

/* --- Bouton d'entrée « J'ai colorié ce dessin ! » --- */
.jc-creations-cta{margin:18px 0 6px;text-align:center}
.jc-creations-cta__btn{display:inline-flex;align-items:center;gap:9px;border:2px solid #f2a842;border-radius:6px;background:#fff;color:#111;font-weight:700;font-size:1em;padding:10px 18px;cursor:pointer}
.jc-creations-cta__btn:hover,.jc-creations-cta__btn:focus{background:#fdf3e3;color:#111}
.jc-creations-cta__icon{font-size:1.15em;line-height:1}
.jc-creations-cta__hint{margin:6px 0 0;color:#6b7280;font-size:.85em}

/* --- Section de la page dessin --- */
.jc-creations{clear:both;margin:34px 0;padding:24px 0;border-top:1px solid #e5e7eb;border-bottom:1px solid #e5e7eb}
.jc-creations__head h2{margin:0 0 16px;line-height:1.25}
.jc-creations__notice{margin:10px 0;padding:10px 12px;border-radius:8px;background:#fff7ed;color:#9a3412}
.jc-creations__notice.is-error{background:#fef2f2;color:#991b1b}
/* align-items:start — sinon chaque carte s'étire à la hauteur de la plus haute de sa
   rangée et laisse un grand aplat blanc sous les créations au format paysage. */
.jc-creations__grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(190px,1fr));gap:16px;align-items:start}
.jc-creations__more{display:block;margin:18px auto 0;background:#fff;color:#111!important;border:2px solid #f2a842;border-radius:6px;font-weight:700;padding:9px 18px;cursor:pointer}
.jc-creations__more[hidden]{display:none}
.jc-creations__more:hover,.jc-creations__more:focus{background:#fdf3e3;color:#111!important}

.jc-creation{margin:0;border:1px solid #eef2f7;border-radius:10px;overflow:hidden;background:#fff}
.jc-creation__media{display:block;background:#f8fafc;cursor:zoom-in}
.jc-creation__media img{display:block;width:100%;height:auto;transition:opacity .15s ease}
.jc-creation__media:hover img{opacity:.9}
.jc-creation__body{display:flex;align-items:center;flex-wrap:wrap;gap:6px;padding:8px 10px}
.jc-creation__author{flex:1 1 100%;color:#374151;font-size:13px;font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.jc-creation__rating{display:flex;align-items:center;gap:1px}
/* Le thème stylise <button> : on neutralise fond, bordure, ombre et états, sinon le
   survol fait apparaître le bouton par-dessus l'étoile. */
.jc-creation__star{border:0;background:none;box-shadow:none;padding:0 1px;font-size:17px;line-height:1;color:#d1d5db;cursor:pointer;transition:color .12s ease,transform .12s ease;transform-origin:center}
.jc-creation__star:hover,.jc-creation__star:focus,.jc-creation__star:active{background:none;box-shadow:none;outline:none}
.jc-creation__star:focus-visible{outline:2px solid #f2a842;outline-offset:2px;border-radius:3px}
.jc-creation__star.is-on{color:#f2a842}
.jc-creation__star.is-mine{color:#e07b00}
.jc-creation__star:disabled{cursor:default}
/* Survol : remplissage progressif jusqu'à l'étoile pointée. On allume tout le groupe,
   puis on rééteint ce qui suit l'étoile survolée (le second sélecteur est plus
   spécifique, il l'emporte). */
.jc-creation__rating:hover .jc-creation__star:not(:disabled){color:#f2a842;transform:scale(1.18)}
.jc-creation__rating:hover .jc-creation__star:not(:disabled):hover ~ .jc-creation__star{color:#d1d5db;transform:none}
.jc-creation__rating:hover .jc-creation__score{opacity:.5}
.jc-creation__score{margin-left:6px;color:#6b7280;font-size:12px;transition:opacity .12s ease}
.jc-creation__new{background:#ecfdf5;color:#0f766e;border-radius:999px;padding:1px 8px;font-weight:700}
.jc-creation__report{margin-left:auto;border:0;background:none;color:#9ca3af;font-size:14px;cursor:pointer;padding:0 2px}
.jc-creation__report:hover{color:#b91c1c}
.jc-creation__report:disabled{color:#d1d5db;cursor:default}
.jc-creation.is-mine{border-color:#f2a842}

/* --- Modale de dépôt --- */
html.jc-creations-lock{overflow:hidden}
.jc-creations-modal{position:fixed;inset:0;z-index:100000;background:rgba(17,24,39,.72);display:flex;align-items:center;justify-content:center;padding:16px}
.jc-creations-modal[hidden]{display:none}
.jc-creations-modal__dialog{position:relative;background:#fff;border-radius:14px;padding:22px;width:min(560px,100%);max-height:92vh;overflow:auto;box-shadow:0 18px 48px rgba(0,0,0,.32)}
.jc-creations-modal__close{position:absolute;top:8px;right:10px;border:0;background:none;font-size:26px;line-height:1;color:#9ca3af;cursor:pointer}
.jc-creations-modal__title{margin:0 0 6px;font-size:1.25em}
.jc-creations-modal__tips{margin:0 0 14px;color:#6b7280;font-size:.85em}
.jc-creations-modal__drop{display:flex;align-items:center;justify-content:center;text-align:center;min-height:96px;border:2px dashed #f2a842;border-radius:10px;background:#fffaf2;color:#92400e;padding:14px;cursor:pointer;transition:background .12s ease,border-color .12s ease}
/* display:flex l'emporterait sur l'attribut hidden : il faut le neutraliser explicitement. */
.jc-creations-modal__drop[hidden]{display:none}
.jc-creations-modal__drop:hover,.jc-creations-modal__drop:focus-visible{background:#fdf0dc;outline:none}
.jc-creations-modal__drop.is-dragover{background:#fce6c2;border-color:#e07b00;border-style:solid}
.jc-creations-modal__stage{position:relative;margin-top:14px;background:#f8fafc;border-radius:10px;overflow:hidden;touch-action:none;user-select:none}
.jc-creations-modal__stage[hidden]{display:none}
.jc-creations-modal__stage img{display:block;width:100%;height:auto;max-height:52vh;object-fit:contain;pointer-events:none}
/* En rotation ±90° l'image tournée déborde de son cadre : on la contient. */
.jc-creations-modal__stage img.is-swapped{max-height:38vh}
.jc-creations-modal__crop{position:absolute;border:2px solid #f2a842;background:rgba(242,168,66,.16);box-shadow:0 0 0 9999px rgba(17,24,39,.4);pointer-events:none}
.jc-creations-modal__crop[hidden]{display:none}
.jc-creations-modal__tools{display:flex;gap:8px;margin-top:10px;flex-wrap:wrap;align-items:center}
.jc-creations-modal__tools[hidden]{display:none}
.jc-creations-modal__tools button{border:1px solid #d1d5db;border-radius:999px;background:#fff;color:#374151;padding:6px 12px;cursor:pointer}
.jc-creations-modal__tools button[hidden]{display:none}
.jc-creations-modal__tools button:hover{background:#f9fafb}
.jc-creations-modal__change{margin-left:auto}
/* Le recadrage se fait en glissant sur l'aperçu : sans cette phrase, personne ne le trouve. */
.jc-creations-modal__hint{flex:1 1 100%;color:#6b7280;font-size:.8em}
.jc-creations-modal__consent{display:flex;align-items:flex-start;gap:8px;margin-top:14px;font-size:.9em;color:#374151;cursor:pointer}
.jc-creations-modal__error{margin:10px 0 0;padding:9px 11px;border-radius:8px;background:#fef2f2;color:#991b1b;font-size:.9em}
.jc-creations-modal__error[hidden]{display:none}
.jc-creations-modal__actions{display:flex;justify-content:flex-end;gap:10px;margin-top:16px}
.jc-creations-modal__cancel{border:1px solid #d1d5db;border-radius:6px;background:#fff;color:#374151;font-weight:600;padding:10px 16px;cursor:pointer}
.jc-creations-modal__submit{border:0;border-radius:6px;background:#f2a842;color:#111;font-weight:700;padding:11px 20px;cursor:pointer}
.jc-creations-modal__submit:hover{background:#e59a2f}
.jc-creations-modal__submit:disabled{opacity:.6;cursor:default}

/* Écran de succès : la modale se transforme, aucun dialogue natif. */
.jc-creations-modal__success{position:relative;background:#fff;border-radius:14px;padding:28px 22px;width:min(460px,100%);max-height:92vh;overflow:auto;text-align:center;box-shadow:0 18px 48px rgba(0,0,0,.32)}
.jc-creations-modal__success[hidden]{display:none}
.jc-creations-modal__success-icon{width:56px;height:56px;margin:0 auto 12px;border-radius:50%;background:#ecfdf5;color:#0f766e;font-size:30px;line-height:56px;font-weight:700}
.jc-creations-modal__success h2{margin:0 0 10px;font-size:1.25em}
.jc-creations-modal__success img{display:block;max-width:180px;max-height:180px;width:auto;margin:0 auto 12px;border-radius:8px}
.jc-creations-modal__success img[hidden]{display:none}
.jc-creations-modal__success p{margin:0 0 4px;color:#374151}
.jc-creations-modal__success .jc-creations-modal__actions{justify-content:center}
.jc-creations-modal__success a.jc-creations-modal__submit{display:inline-block;text-decoration:none;color:#111!important}
.jc-creations-modal__success a[hidden]{display:none}
.jc-creations-modal__dialog[hidden]{display:none}

/* Confirmation en deux temps, à la place d'un confirm() natif. */
.jc-creation__report.is-confirming,.jc-creation-actions button.is-confirming{width:auto;background:#fef2f2;color:#991b1b;border:1px solid #fca5a5;border-radius:999px;padding:2px 9px;font-size:12px;font-weight:700}
.jc-creation-error{display:block;margin-top:6px;color:#991b1b;font-size:12px}
.jc-creation-view{display:inline-block;margin-top:4px;font-size:.9em}

/* --- Bloc d'incitation sous l'outil de coloriage en ligne --- */
.jc-studio-promo{max-width:1100px;margin:32px auto 0;padding:22px 24px;border:1px solid #f4d9ae;border-radius:14px;background:#fffaf2;text-align:center}
.jc-studio-promo__title{margin:0 0 6px;font-size:1.3em;line-height:1.25}
.jc-studio-promo__count{margin:0 0 14px;color:#6b7280}
.jc-studio-promo__badge{display:inline-block;min-width:26px;padding:1px 9px;border-radius:999px;background:#f2a842;color:#111;font-weight:700}
.jc-studio-promo__grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(110px,140px));gap:12px;justify-content:center;margin-bottom:14px}
.jc-studio-promo__item{display:block;border:1px solid #eee3d0;border-radius:10px;overflow:hidden;background:#fff;line-height:0;transition:transform .12s ease,box-shadow .12s ease}
.jc-studio-promo__item img{display:block;width:100%;height:auto}
a.jc-studio-promo__item:hover,a.jc-studio-promo__item:focus{transform:translateY(-2px);box-shadow:0 6px 16px rgba(0,0,0,.12)}
.jc-studio-promo__how{margin:0 0 6px;color:#374151}
.jc-studio-promo__month{margin:0 0 16px;color:#6b7280;font-size:.9em}
/* Rendu identique que le CTA soit un <a> (connecté → espace membre) ou un <button>
   (déconnecté → ouverture de la modale d'inscription sur place). */
.jc-studio-promo__cta{display:inline-block;border:0;border-radius:6px;background:#f2a842;color:#111!important;font:inherit;font-weight:700;line-height:1.4;padding:11px 22px;text-decoration:none;cursor:pointer}
.jc-studio-promo__cta:hover,.jc-studio-promo__cta:focus{background:#e59a2f;color:#111!important}
.jc-studio-promo__cta:focus-visible{outline:2px solid #92400e;outline-offset:2px}
@media (max-width:720px){
  .jc-studio-promo{margin:24px 10px 0;padding:18px 14px}
  .jc-studio-promo__grid{grid-template-columns:repeat(auto-fit,minmax(88px,110px));gap:8px}
}

/* --- Espace membre : « Mes publications » --- */
.jc-creations-mine .jc-creation-media{position:relative;background:#f8fafc;border-radius:8px;overflow:hidden}
.jc-creations-mine .jc-creation-media img{display:block;width:100%;height:auto}
.jc-creation-placeholder{display:flex;align-items:center;justify-content:center;min-height:130px;font-size:28px;color:#9ca3af}
.jc-creation-status{display:inline-block;border-radius:999px;padding:2px 10px;font-size:12px;font-weight:700}
.jc-creation-status.is-pending{background:#fef3c7;color:#92400e}
.jc-creation-status.is-approved{background:#ecfdf5;color:#0f766e}
.jc-creation-status.is-rejected{background:#fef2f2;color:#991b1b}
.jc-creation-reason,.jc-creation-note{display:block;margin-top:5px;color:#6b7280;font-size:12px}
.jc-creation-publish{border:2px solid #f2a842;border-radius:6px;background:#fff;color:#111;font-weight:700;padding:7px 13px;cursor:pointer}
.jc-creation-publish:hover{background:#fdf3e3}
.jc-creation-publish:disabled{opacity:.6;cursor:default}
.jc-creation-published{color:#0f766e;font-weight:700;font-size:.9em}

@media (max-width:720px){
  .jc-creations{margin:26px 0;padding:20px 0}
  .jc-creations__grid{grid-template-columns:repeat(auto-fill,minmax(140px,1fr));gap:12px}
  .jc-creations-modal__dialog{padding:18px}
}
