/* « Mes thèmes » (28/11/2026) : l'icône de l'en-tête, le panneau, le message après un ajout et le thème choisi sur la fiche
   produit (assets/front/my-themes.js, templates/front/_my_themes.html.twig). */
.nav-themes[hidden] { display: none; }

.mt-panel { margin: 0 0 0 auto; padding: 0; border: 0; width: min(460px, 100vw); height: 100vh; height: 100dvh; max-height: none; max-width: 100vw; background: #fff; color: #111; box-shadow: -12px 0 40px rgba(0, 0, 0, .18); }
.mt-panel[open] { display: flex; flex-direction: column; }
.mt-panel::backdrop { background: rgba(17, 17, 17, .45); }
.mt-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 20px; border-bottom: 1px solid #F0F0F0; }
.mt-title { margin: 0; display: flex; align-items: center; gap: 8px; font-size: 1.1rem; font-weight: 800; color: #111; }
.mt-title i { color: var(--accent, #E11D55); }
.mt-close { flex: none; width: 36px; height: 36px; border: 0; border-radius: 50%; background: #F3F4F6; color: #111; font-size: 1.3rem; line-height: 1; cursor: pointer; }
.mt-close:hover { background: #E5E7EB; }
.mt-body { flex: 1; overflow-y: auto; padding: 16px 20px 28px; }
.mt-intro { margin: 0 0 14px; font-size: .88rem; line-height: 1.55; color: #4B5563; }
.mt-link { color: var(--accent-text, #C8144A); font-weight: 700; text-decoration: underline; }
.mt-about { margin: 0 0 16px; padding: 10px 12px; border-radius: 12px; background: #FDF2F5; border: 1px solid rgba(225, 29, 85, .18); font-size: .84rem; line-height: 1.5; color: #374151; }
.mt-about summary { cursor: pointer; font-weight: 800; color: #111; }
.mt-about[open] summary { margin-bottom: 6px; }
.mt-about p { margin: 0 0 6px; }

.mt-opts { display: flex; flex-direction: column; gap: 12px; margin: 0 0 16px; padding: 12px; border-radius: 12px; background: #F7F5F2; }
.mt-opts[hidden], .mt-opt[hidden] { display: none; }
.mt-opt { display: flex; flex-direction: column; gap: 6px; }
.mt-opt-label { font-size: .72rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: #6B7280; }
.mt-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.mt-pill { position: relative; cursor: pointer; }
.mt-pill input { position: absolute; opacity: 0; pointer-events: none; }
.mt-pill span { display: inline-block; padding: 7px 12px; border: 1.5px solid #E5E7EB; border-radius: 999px; background: #fff; font-size: .82rem; font-weight: 700; color: #111; }
.mt-pill input:checked + span { border-color: #111; background: #111; color: #fff; }
.mt-pill input:focus-visible + span { outline: 3px solid var(--accent, #E11D55); outline-offset: 2px; }
.mt-opt-hint { margin: 0; font-size: .78rem; line-height: 1.45; color: #6B7280; }

.mt-list { display: flex; flex-direction: column; gap: 12px; }
.mt-row { display: flex; flex-direction: column; gap: 10px; padding: 12px; border: 1px solid #EEE; border-radius: 14px; }
.mt-row-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.mt-name { margin: 0; font-size: .95rem; font-weight: 800; line-height: 1.3; color: #111; }
.mt-remove { flex: none; width: 30px; height: 30px; border: 0; border-radius: 50%; background: none; color: #9CA3AF; font-size: 1.25rem; line-height: 1; cursor: pointer; }
.mt-remove:hover { background: #F3F4F6; color: #111; }
.mt-imgs { display: flex; align-items: stretch; gap: 6px; height: 84px; }
.mt-img { flex: none; height: 100%; width: auto; object-fit: cover; border-radius: 8px; background: #f3f3f3; }
.mt-img--portrait { aspect-ratio: 3 / 4; }
.mt-img--square { aspect-ratio: 1 / 1; }
/* La couverture prend la place qui reste (recadrée), pour que la manche ne sorte jamais de la ligne sur un téléphone. */
.mt-img--wide { flex: 1 1 0; width: 0; min-width: 0; }
.mt-img--sleeve { aspect-ratio: 1 / 4; object-fit: contain; background: repeating-conic-gradient(#efefef 0 25%, #fff 0 50%) 0 0 / 10px 10px; }
.mt-use { align-self: stretch; padding: 10px 12px; border: 0; border-radius: 10px; background: #111; color: #fff; font: 700 .86rem var(--font, inherit); cursor: pointer; }
.mt-use:hover { background: var(--accent, #E11D55); }
.mt-use.is-chosen { background: #ECFDF5; color: #065F46; box-shadow: inset 0 0 0 1.5px #A7F3D0; }
.mt-locked { margin: 0; padding: 8px 10px; border-radius: 10px; background: #FFF4D6; color: #6B4E00; font-size: .8rem; line-height: 1.45; }
.mt-row.is-locked .mt-imgs { opacity: .6; }
.mt-empty, .mt-loading, .mt-error { margin: 0; font-size: .9rem; color: #4B5563; }
.mt-empty p { margin: 0 0 8px; }
.mt-error { color: #B91C1C; }

.mt-toast { position: fixed; left: 50%; bottom: 20px; z-index: 9998; transform: translateX(-50%); display: flex; align-items: center; gap: 12px; width: max-content; max-width: calc(100vw - 32px); padding: 12px 12px 12px 16px; border-radius: 14px; background: #111; color: #fff; box-shadow: 0 10px 30px rgba(0, 0, 0, .25); }
.mt-toast[hidden] { display: none; }
.mt-toast-text { margin: 0; font-size: .86rem; line-height: 1.45; }
.mt-toast-go { white-space: nowrap; font-size: .84rem; font-weight: 800; color: #fff; text-decoration: underline; }
.mt-toast-go:hover { color: #FFB3C8; }
.mt-toast-go[hidden] { display: none; }
.mt-toast-close { flex: none; border: 0; background: none; color: #fff; font-size: 1.2rem; line-height: 1; opacity: .75; cursor: pointer; }

.mt-pick { display: flex; align-items: center; gap: 10px; margin: 10px 0 0; padding: 8px 10px; border: 1px solid rgba(225, 29, 85, .25); border-radius: 12px; background: #FDF2F5; }
.mt-pick[hidden] { display: none; }
.mt-pick-img { flex: none; width: 36px; height: 48px; object-fit: cover; border-radius: 6px; }
.mt-pick-text { flex: 1; margin: 0; font-size: .84rem; font-weight: 600; line-height: 1.35; color: #111; }
.mt-pick-change { border: 0; background: none; color: var(--accent-text, #C8144A); font-size: .82rem; font-weight: 700; text-decoration: underline; cursor: pointer; }
.mt-pick-remove { flex: none; width: 28px; height: 28px; border: 0; border-radius: 50%; background: none; color: #6B7280; font-size: 1.2rem; line-height: 1; cursor: pointer; }
.mt-pick-remove:hover { background: rgba(0, 0, 0, .06); color: #111; }
#btn-open-editor.has-theme { position: relative; overflow: hidden; }
#btn-open-editor.has-theme .fa-pen-nib { display: none; }
.mt-btn-thumb { flex: none; width: 26px; height: 34px; object-fit: cover; border-radius: 5px; box-shadow: 0 0 0 2px rgba(255, 255, 255, .85); }
/* Un seul reflet au moment du choix, jamais en boucle (règle de Benoit : rien qui clignote ni n'alterne). */
#btn-open-editor.mt-shine::after { content: ""; position: absolute; top: 0; bottom: 0; left: -40%; width: 35%; background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .55), transparent); transform: skewX(-18deg); animation: mt-shine 1s ease-out 1 forwards; pointer-events: none; }
@keyframes mt-shine { to { left: 120%; } }
@media (prefers-reduced-motion: reduce) { #btn-open-editor.mt-shine::after { display: none; } }

/* Sur un téléphone, l'icône en plus serrait l'en-tête jusqu'à écraser le logo : les boutons se tassent un peu quand
   elle est là, et le logo garde toujours ses proportions. */
@media (max-width: 480px) {
  .nav-inner:has(.nav-themes:not([hidden])) { padding-left: 14px; padding-right: 14px; }
  .nav-actions:has(.nav-themes:not([hidden])) { gap: 5px; }
  .nav-actions:has(.nav-themes:not([hidden])) .nav-icon-btn { width: 34px; height: 34px; }
  .nav-actions:has(.nav-themes:not([hidden])) .nav-burger { width: 36px; height: 36px; }
  .nav-logo-img { object-fit: contain; object-position: left center; }
}

@media (max-width: 768px) {
  .mt-panel { width: 100vw; }
  .mt-head { padding: 14px 16px; }
  .mt-body { padding: 14px 16px 24px; }
  .mt-imgs { height: 70px; }
  .mt-toast { bottom: 12px; flex-wrap: wrap; width: calc(100vw - 32px); }
}
