/* Vos cartes, the workshop (docs/DEFIS.md, lot 2d; the mockup validated on 2026-11-30; template/espace/vos-cartes-atelier.php,
   static/js/espace/cartes.js): the categories with their count, the card to write, the cards of the couple, the sheet
   that writes one, the full category. In the theme of the space (espace.css: the band, the tab bar, the ticket of the
   Pass); everything here is prefixed vc-. */

.vc-waves {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: max(100%, 1180px);
}

.vc-shell {
  position: relative;
  flex: 1;
  width: min(430px, calc(100% - 32px));
  margin: 0 auto;
  padding: calc(34px + env(safe-area-inset-top, 0px)) 0 18px;
}

.vc-back {
  position: absolute;
  top: calc(31px + env(safe-area-inset-top, 0px));
  left: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .18);
  color: #ffffff;
}

.vc-shell .vc-title {
  margin: 0 0 0 54px;
}

.vc-lead {
  max-width: 250px;
  margin: 6px 0 0 54px;
  color: var(--lc-blush);
  font-size: 13.5px;
  font-weight: 800;
  line-height: 1.3;
}

/* The categories, each with its count; a full one in gold. */
.vc-cats {
  display: flex;
  gap: 8px;
  margin: 26px -16px 0;
  padding: 4px 16px 10px;
  overflow-x: auto;
  scrollbar-width: none;
}

.vc-cats::-webkit-scrollbar {
  display: none;
}

.vc-cat {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 7px;
  height: 38px;
  padding: 0 8px 0 14px;
  border: 2px solid rgba(255, 255, 255, .38);
  border-radius: 19px;
  background: transparent;
  color: #ffffff;
  font: inherit;
  font-size: 14px;
  font-weight: 900;
  white-space: nowrap;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.vc-cat__n {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  height: 24px;
  padding: 0 7px;
  border-radius: 12px;
  background: rgba(255, 255, 255, .16);
  font-size: 12px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.vc-cat[aria-pressed="true"] {
  border-color: var(--lc-cream);
  background: var(--lc-cream);
  color: var(--lc-raspberry);
}

.vc-cat[aria-pressed="true"] .vc-cat__n {
  background: rgba(196, 40, 91, .12);
}

.vc-cat.is-full .vc-cat__n {
  background: #ffe08a;
  color: #3b1438;
}

/* The card to write, then their cards, two by two. */
.vc-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 6px;
}

.vc-write,
.vc-mine {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 152px;
  border-radius: 20px;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: transform .12s ease;
  -webkit-tap-highlight-color: transparent;
}

.vc-write:active,
.vc-mine:active {
  transform: translateY(3px);
}

.vc-write {
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px;
  border: 2.5px dashed rgba(255, 255, 255, .55);
  background: rgba(255, 255, 255, .08);
  color: #ffffff;
  text-align: center;
}

.vc-write__plus {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--lc-cream);
  box-shadow: 0 5px 0 rgba(40, 6, 30, .3);
  color: var(--lc-raspberry);
}

.vc-write b {
  font-size: 15px;
  font-weight: 900;
}

.vc-write small {
  color: var(--lc-blush);
  font-size: 12.5px;
  font-weight: 800;
  line-height: 1.3;
}

.vc-write.is-full {
  border-color: #ffe08a;
  background: rgba(255, 224, 138, .1);
}

.vc-write.is-full .vc-write__plus {
  background: #ffe08a;
  color: #3b1438;
}

.vc-mine {
  gap: 10px;
  padding: 14px 14px 12px;
  border: 0;
  background: linear-gradient(170deg, #fffdf8, #fbf3e6);
  box-shadow: 0 6px 0 rgba(74, 14, 46, .3), 0 16px 24px -16px rgba(40, 6, 30, .6);
  color: var(--lc-plum);
}

.vc-mine.is-new {
  animation: vc-in .45s cubic-bezier(.2, 1.3, .4, 1) both;
}

@keyframes vc-in {
  from { opacity: 0; transform: translateY(14px) scale(.96); }
  to { opacity: 1; transform: none; }
}

.vc-mine::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 60px;
  height: 60px;
  border-radius: 20px 0 60px 0;
  background: linear-gradient(135deg, rgba(244, 96, 183, .12), rgba(244, 96, 183, 0));
  pointer-events: none;
}

.vc-mine__tag {
  align-self: flex-start;
  padding: 4px 9px;
  border-radius: 10px;
  background: var(--lc-plum);
  color: #ffffff;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.vc-mine__tag--dare {
  background: var(--lc-rose);
}

.vc-mine__text {
  display: -webkit-box;
  overflow: hidden;
  font-size: 14.5px;
  font-weight: 800;
  line-height: 1.3;
  overflow-wrap: anywhere;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
}

.vc-mine__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  color: rgba(112, 42, 113, .55);
  font-size: 11.5px;
  font-weight: 900;
}

.vc-mine__edit {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(112, 42, 113, .08);
}

.vc-empty {
  grid-column: 1 / -1;
  margin: 4px 0 0;
  color: var(--lc-blush);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.4;
  text-align: center;
}

/* « Jouer », just above the tab bar. */
.vc-foot {
  position: sticky;
  bottom: calc(72px + env(safe-area-inset-bottom, 0px));
  z-index: 4;
  padding: 26px 16px 12px;
  background: linear-gradient(180deg, rgba(139, 46, 120, 0), rgba(122, 40, 112, .96) 45%);
  pointer-events: none;
}

.vc-play {
  display: flex;
  align-items: center;
  justify-content: center;
  width: min(430px, 100%);
  height: 54px;
  margin: 0 auto;
  border-radius: 27px;
  background: var(--lc-cream);
  box-shadow: 0 5px 0 rgba(40, 6, 30, .35);
  color: var(--lc-raspberry);
  font-size: 15px;
  font-weight: 900;
  letter-spacing: .06em;
  text-decoration: none;
  text-transform: uppercase;
  pointer-events: auto;
}

.vc-play:active {
  transform: translateY(3px);
}

/* A category of the Pass, without it: its lock before the words. */
.vc-play__lock {
  display: flex;
  margin-right: 8px;
}

/* The word after a card written, changed or taken away: above « Jouer », on two lines when it needs them. */
.lc .vc-toast {
  bottom: calc(160px + env(safe-area-inset-bottom, 0px));
  width: max-content;
  border-radius: 22px;
  line-height: 1.3;
  white-space: normal;
}

/* The sheet that writes a card. */
.vc-sheet {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.vc-sheet__veil {
  position: absolute;
  inset: 0;
  background: rgba(40, 6, 30, .55);
  animation: vc-fade .25s ease both;
}

.vc-sheet__panel {
  position: relative;
  width: min(480px, 100%);
  max-height: calc(100% - 24px);
  margin: 0 auto;
  overflow-y: auto;
  padding: 12px 18px calc(22px + env(safe-area-inset-bottom, 0px));
  border-radius: 28px 28px 0 0;
  background: var(--lc-cream);
  color: var(--lc-plum);
  animation: vc-up .45s cubic-bezier(.2, .8, .2, 1) both;
}

@keyframes vc-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes vc-up {
  from { transform: translateY(100%); }
  to { transform: none; }
}

.vc-sheet__grip {
  width: 42px;
  height: 5px;
  margin: 0 auto 12px;
  border-radius: 3px;
  background: rgba(112, 42, 113, .2);
}

.vc-sheet__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.vc-sheet__head h2 {
  margin: 0;
  font-size: 21px;
  font-weight: 900;
}

.vc-sheet__x {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: rgba(112, 42, 113, .08);
  color: var(--lc-plum);
  cursor: pointer;
}

.vc-kinds {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin: 14px 0 0;
  padding: 4px;
  border-radius: 16px;
  background: rgba(112, 42, 113, .08);
}

.vc-kinds button {
  height: 40px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--lc-plum);
  font: inherit;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: .06em;
  text-transform: uppercase;
  cursor: pointer;
}

.vc-kinds button[aria-pressed="true"] {
  background: #ffffff;
  box-shadow: 0 3px 0 rgba(112, 42, 113, .15);
  color: var(--lc-rose);
}

.vc-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.vc-field {
  display: block;
  box-sizing: border-box;
  width: 100%;
  min-height: 104px;
  margin: 12px 0 0;
  padding: 14px;
  border: 2px solid rgba(112, 42, 113, .14);
  border-radius: 16px;
  background: #ffffff;
  color: var(--lc-plum);
  font: inherit;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.35;
  resize: none;
}

.vc-field:focus {
  border-color: var(--lc-rose);
  outline: none;
}

.vc-field::placeholder {
  color: rgba(112, 42, 113, .4);
}

.vc-sheet__label {
  margin: 14px 0 6px;
  color: rgba(112, 42, 113, .65);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.vc-pick {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.vc-pick button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 10px 0 12px;
  border: 2px solid rgba(112, 42, 113, .16);
  border-radius: 17px;
  background: #ffffff;
  color: var(--lc-plum);
  font: inherit;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
}

.vc-pick button small {
  color: rgba(112, 42, 113, .5);
  font-size: 11px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.vc-pick button[aria-pressed="true"] {
  border-color: var(--lc-rose);
  background: var(--lc-rose);
  color: #ffffff;
}

.vc-pick button[aria-pressed="true"] small {
  color: rgba(255, 255, 255, .8);
}

.vc-pick button.is-full {
  border-style: dashed;
  color: rgba(112, 42, 113, .45);
}

.vc-pick button.is-full[aria-pressed="true"] {
  border-color: #e9c077;
  background: #fff3cf;
  color: #3b1438;
}

.vc-pick button.is-full[aria-pressed="true"] small {
  color: rgba(59, 20, 56, .6);
}

.vc-full {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 12px 0 0;
  padding: 12px 14px;
  border-radius: 16px;
  background: #fff3cf;
  color: #3b1438;
  font-size: 13.5px;
  font-weight: 800;
  line-height: 1.38;
}

.vc-full svg {
  flex: none;
}

.vc-full[hidden] {
  display: none;
}

.vc-full__go {
  display: inline-block;
  margin-top: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: #e9c077;
  box-shadow: 0 3px 0 #c98f35;
  color: #2f1239;
  font-size: 13px;
  font-weight: 900;
  text-decoration: none;
}

.vc-error:empty {
  display: none;
}

.vc-save {
  display: block;
  width: 100%;
  height: 54px;
  margin-top: 16px;
  border: 0;
  border-radius: 27px;
  background: var(--lc-rose);
  box-shadow: 0 5px 0 #8d1b45;
  color: #ffffff;
  font: inherit;
  font-size: 15px;
  font-weight: 900;
  letter-spacing: .06em;
  text-transform: uppercase;
  cursor: pointer;
}

.vc-save:disabled {
  opacity: .45;
  cursor: default;
}

.vc-remove {
  display: block;
  margin: 12px auto 0;
  padding: 6px 12px;
  border: 0;
  background: none;
  color: #d6374b;
  font: inherit;
  font-size: 14px;
  font-weight: 900;
  cursor: pointer;
}

.vc-remove[hidden] {
  display: none;
}

.vc-cat:focus-visible,
.vc-write:focus-visible,
.vc-mine:focus-visible,
.vc-play:focus-visible,
.vc-back:focus-visible {
  outline: 3px solid var(--lc-blush);
  outline-offset: 3px;
}

.vc-kinds button:focus-visible,
.vc-pick button:focus-visible,
.vc-save:focus-visible,
.vc-remove:focus-visible,
.vc-sheet__x:focus-visible {
  outline: 3px solid var(--lc-rose);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .vc-mine.is-new,
  .vc-sheet__veil,
  .vc-sheet__panel {
    animation: none;
  }
}
