.dc {
  background: var(--dc-bg);
  border-radius: 14px;
  border: 1px solid #2A2E38;
  overflow: hidden;
  color: var(--dc-text);
  font-size: 14.5px;
  line-height: 1.45;
  box-shadow: 0 24px 60px -28px rgba(20, 22, 29, .55);
}

.dc-bar {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 11px 14px;
  background: var(--dc-bg-2);
  border-bottom: 1px solid #2A2E38;
}

.dc-dot { width: 10px; height: 10px; border-radius: 50%; background: #3A3F4B; }

.dc-chan {
  margin-left: 6px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--dc-text-3);
}

.dc-feed {
  padding: 14px 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.dc-msg { display: flex; gap: 12px; align-items: flex-start; }

.dc-av-slot {
  flex: 0 0 38px;
  width: 38px;
  display: flex;
  justify-content: center;
  padding-top: 2px;
}

.dc-msg.is-grouped { margin-top: -11px; }

.dc-hovertime {
  font-size: 10.5px;
  color: var(--dc-text-3);
  opacity: 0;
  transition: opacity .1s ease;
  padding-top: 4px;
}
.dc-msg.is-grouped:hover .dc-hovertime { opacity: 1; }

.dc-msg-sys .dc-join {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(42, 157, 107, .15);
  color: var(--green);
  font-weight: 700;
  font-size: 14px;
  margin-top: 1px;
}

.dc-av {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15px;
  color: #fff;
  user-select: none;
}

.dc-body { min-width: 0; flex: 1; }

.dc-head {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 3px;
}

.dc-name { font-weight: 600; font-size: 14.5px; }

.dc-tag {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .04em;
  background: var(--blurple);
  color: #fff;
  padding: 1px 5px;
  border-radius: 4px;
  text-transform: uppercase;
}

.dc-time { font-size: 11.5px; color: var(--dc-text-3); }

.dc-txt { color: var(--dc-text); word-wrap: break-word; }
.dc-txt code {
  font-family: var(--font-mono);
  font-size: .86em;
  background: #0D0F14;
  padding: 1.5px 5px;
  border-radius: 4px;
  color: #C9CEDC;
}
.dc-txt strong { font-weight: 600; }
.dc-txt em { font-style: italic; }
.dc-txt a { color: #7E8BFF; }

.dc-mention {
  background: rgba(88, 101, 242, .16);
  color: #A2ACFF;
  border-radius: 4px;
  padding: 0 3px;
  font-weight: 500;
}

.dc-sys { font-size: 13px; color: var(--dc-text-2); font-style: italic; }

.dc-input {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 2px 16px 16px;
  padding: 11px 14px;
  background: var(--dc-bg-3);
  border-radius: 9px;
  font-family: var(--font-mono);
  font-size: 13.5px;
  color: var(--dc-text);
}

.dc-input input {
  flex: 1;
  background: none;
  border: 0;
  outline: none;
  color: inherit;
  font: inherit;
}

.dc-input input::placeholder { color: var(--dc-text-3); }

.dc-caret {
  display: inline-block;
  width: 1.5px;
  height: 1.05em;
  background: var(--dc-text);
  vertical-align: text-bottom;
  animation: dcBlink 1.05s steps(1) infinite;
}

@keyframes dcBlink { 0%, 50% { opacity: 1 } 50.01%, 100% { opacity: 0 } }

/* --- Components V2 --- */

.cv-container {
  background: var(--dc-bg-2);
  border-radius: 8px;
  border: 1px solid #2E3340;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 9px;
  max-width: 560px;
}

.cv-container[data-accent] { border-left: 4px solid var(--blurple); }

.cv-text { white-space: pre-wrap; word-wrap: break-word; }
.cv-small { font-size: 12px; color: var(--dc-text-3); }
.cv-list { margin: 2px 0; padding-left: 18px; list-style: none; }
.cv-list li { position: relative; font-size: 13px; color: var(--dc-text-2); }
.cv-list li::before {
  content: "";
  position: absolute;
  left: -12px;
  top: .62em;
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--dc-text-3);
}
.cv-text h3 { font-family: var(--font-body); font-size: 15.5px; font-weight: 600; margin: 0; letter-spacing: 0; }
.cv-text ul { margin: 4px 0; padding-left: 20px; }

.cv-sep { height: 1px; background: #333846; border: 0; margin: 2px 0; }
.cv-sep[data-spacing="2"] { margin: 8px 0; }
.cv-sep[data-hidden] { background: transparent; }

.cv-section { display: flex; gap: 14px; align-items: flex-start; }
.cv-section > .cv-section-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.cv-thumb { flex: 0 0 68px; width: 68px; height: 68px; border-radius: 6px; background: var(--dc-bg-3); }

.cv-row { display: flex; flex-wrap: wrap; gap: 8px; }

.cv-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 15px;
  border-radius: 6px;
  border: 0;
  font-family: var(--font-body);
  font-size: 13.5px;
  font-weight: 500;
  color: #fff;
  background: #4E5058;
  transition: filter .12s ease;
}

.cv-btn:hover:not(:disabled) { filter: brightness(1.16); }
.cv-btn:disabled { opacity: .5; cursor: not-allowed; }

.cv-btn[data-style="1"] { background: var(--blurple); }
.cv-btn[data-style="2"] { background: #4E5058; }
.cv-btn[data-style="3"] { background: #248046; }
.cv-btn[data-style="4"] { background: #DA373C; }
.cv-btn[data-style="5"] { background: transparent; color: #7E8BFF; text-decoration: underline; padding-left: 4px; }

/* --- Simulateur : coquille pleine page --- */

.sim {
  display: grid;
  grid-template-columns: 66px 232px minmax(0, 1fr) 214px;
  height: 100%;
  background: var(--dc-bg);
  color: var(--dc-text);
}

.sim-rail {
  background: #0D0F14;
  padding: 11px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  border-right: 1px solid #1E212A;
}

.sim-guild-icon {
  position: relative;
  width: 44px;
  height: 44px;
  border-radius: 15px;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15px;
  color: var(--dc-text-2);
  background: #1E212A;
  border: 0;
  transition: border-radius .16s ease, background .16s ease, color .16s ease;
}
.sim-guild-icon img { width: 44px; height: 44px; border-radius: inherit; }
.sim-guild-icon:hover { border-radius: 13px; background: var(--blurple); color: #fff; }
.sim-guild-icon[data-active] { border-radius: 13px; }
.sim-guild-icon[data-active]::before {
  content: "";
  position: absolute;
  left: -8px;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 26px;
  border-radius: 0 4px 4px 0;
  background: #fff;
}
.sim-rail-sep { width: 30px; height: 1px; background: #262A34; margin: 3px 0; }

.sim-col { display: flex; flex-direction: column; min-height: 0; }
.sim-chans { background: var(--dc-bg-2); border-right: 1px solid #262A34; }
.sim-members { background: var(--dc-bg-2); border-left: 1px solid #262A34; overflow-y: auto; }

.sim-guild {
  padding: 15px 16px;
  border-bottom: 1px solid #262A34;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -.01em;
}

.sim-cat {
  display: flex;
  align-items: center;
  gap: 4px;
  width: 100%;
  padding: 16px 8px 4px 12px;
  border: 0;
  background: none;
  color: var(--dc-text-3);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  text-align: left;
}
.sim-cat:hover { color: var(--dc-text); }
.sim-cat .chev { transition: transform .12s ease; flex: 0 0 auto; }
.sim-cat[data-closed] .chev { transform: rotate(-90deg); }
.sim-cat-list[hidden] { display: none; }

.sim-chan {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 1px 8px;
  padding: 7px 9px;
  border-radius: 6px;
  color: var(--dc-text-2);
  font-size: 14.5px;
  border: 0;
  background: none;
  width: calc(100% - 16px);
  text-align: left;
}

.sim-chan:hover { background: #23262F; color: var(--dc-text); }
.sim-chan[aria-current="true"] { background: #2D313C; color: #fff; font-weight: 500; }
.sim-chan .h { color: var(--dc-text-3); font-weight: 400; }
.sim-chan .cn { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sim-chan .badge {
  margin-left: auto;
  background: var(--red);
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  border-radius: 8px;
  padding: 1px 6px;
}

.sim-main { min-width: 0; }
.sim-top {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 18px;
  border-bottom: 1px solid #262A34;
  font-size: 14.5px;
}
.sim-top .t { font-weight: 600; }
.sim-top .d { color: var(--dc-text-3); font-size: 12.5px; border-left: 1px solid #333844; padding-left: 10px; }

.sim-feed {
  flex: 1;
  overflow-y: auto;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.sim-feed::-webkit-scrollbar, .sim-members::-webkit-scrollbar { width: 8px; }
.sim-feed::-webkit-scrollbar-thumb, .sim-members::-webkit-scrollbar-thumb { background: #2B2F3A; border-radius: 4px; }

.sim-compose { padding: 0 18px 18px; }

.sim-role-head {
  padding: 15px 14px 5px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--dc-text-3);
}

.sim-member {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 4px 12px;
  margin: 0 6px;
  border-radius: 6px;
  font-size: 13.5px;
  color: var(--dc-text-2);
}
.sim-member:hover { background: #23262F; }
.sim-member img.dc-av { width: 26px; height: 26px; }

.av-slot { position: relative; flex: 0 0 26px; line-height: 0; }
.av-slot .dc-av { width: 26px; height: 26px; font-size: 11px; }
.av-slot .status {
  position: absolute;
  right: -2px;
  bottom: -2px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2.5px solid var(--dc-bg-2);
}
.av-slot .status[data-s="online"] { background: #23A55A; }
.av-slot .status[data-s="idle"] { background: #F0B232; }
.av-slot .status[data-s="dnd"] { background: #F23F43; }
.av-slot .status[data-s="offline"] { background: #80848E; }

@keyframes dcType {
  0%, 60%, 100% { transform: translateY(0); opacity: .5 }
  30% { transform: translateY(-4px); opacity: 1 }
}

.sim-daysep {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 6px 0 2px;
  font-size: 11px;
  font-weight: 600;
  color: var(--dc-text-3);
}
.sim-daysep::before, .sim-daysep::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #262A34;
}
.sim-member .dc-av { flex: 0 0 26px; width: 26px; height: 26px; font-size: 11px; }
.sim-member .n { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sim-member[data-muted="1"] .n { text-decoration: line-through; opacity: .5; }
.sim-member[data-gone="1"] { opacity: .35; }

.sim-hint {
  margin: 0 18px 12px;
  padding: 10px 13px;
  border-radius: 8px;
  background: rgba(88, 101, 242, .1);
  border: 1px solid rgba(88, 101, 242, .28);
  font-size: 13px;
  color: #A9B2FF;
}
.sim-hint code {
  font-family: var(--font-mono);
  background: rgba(0, 0, 0, .3);
  padding: 1px 5px;
  border-radius: 4px;
}

.sim-chan-mobile { display: none; }

@media (max-width: 900px) {
  .sim { grid-template-columns: 1fr; }
  .sim-chans, .sim-members, .sim-rail { display: none; }

  .sim-chan-mobile {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    scrollbar-width: none;
    padding: 10px 14px;
    border-bottom: 1px solid #262A34;
  }
  .sim-chan-mobile::-webkit-scrollbar { display: none; }
  .sim-chan-mobile button {
    flex: 0 0 auto;
    border: 1px solid #333844;
    background: none;
    color: var(--dc-text-2);
    border-radius: 100px;
    padding: 5px 12px;
    font-family: var(--font-mono);
    font-size: 12px;
  }
  .sim-chan-mobile button[aria-current="true"] {
    background: #2D313C;
    border-color: #454B5A;
    color: #fff;
  }
  .sim-chan-mobile button .badge {
    background: var(--red);
    color: #fff;
    border-radius: 8px;
    padding: 0 5px;
    margin-left: 5px;
    font-size: 10px;
  }

  .sim-top .d { display: none; }
  .sim-feed { padding: 14px; }
  .sim-compose { padding: 0 14px 14px; }
  .sim-hint { margin: 0 14px 10px; }
}

/* --- Formulaires (modals) --- */

.modal-back {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(10, 11, 15, .72);
  display: grid;
  place-items: center;
  padding: 20px;
  animation: modalIn .14s ease;
}

@keyframes modalIn { from { opacity: 0 } to { opacity: 1 } }

.modal-box {
  width: min(460px, 100%);
  max-height: 86vh;
  overflow-y: auto;
  background: var(--dc-bg-2);
  border: 1px solid #333844;
  border-radius: 10px;
  padding: 22px 22px 18px;
  color: var(--dc-text);
  box-shadow: 0 24px 60px -20px rgba(0, 0, 0, .6);
}

.modal-box h3 {
  font-family: var(--font-display);
  font-size: 1.12rem;
  font-weight: 600;
  margin: 0 0 18px;
  letter-spacing: -.015em;
}

.modal-field { display: block; margin-bottom: 16px; }
.modal-field span {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--dc-text-2);
  margin-bottom: 7px;
}
.modal-field input, .modal-field textarea {
  width: 100%;
  background: #0D0F14;
  border: 1px solid #333844;
  border-radius: 6px;
  padding: 10px 12px;
  color: var(--dc-text);
  font: inherit;
  font-size: 14px;
  resize: vertical;
}
.modal-field input:focus, .modal-field textarea:focus {
  outline: none;
  border-color: var(--blurple);
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  margin-top: 4px;
}

/* --- Listes déroulantes façon Discord --- */

.dsel {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  max-width: 420px;
  padding: 9px 12px;
  border-radius: 4px;
  background: var(--dc-bg-3);
  border: 1px solid #3A404E;
  color: var(--dc-text);
  font: inherit;
  font-size: 14px;
  text-align: left;
  transition: border-color .12s ease;
}
.dsel:hover:not(:disabled) { border-color: #4A5163; }
.dsel:disabled { opacity: .5; cursor: not-allowed; }

.dsel-label {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dsel-label[data-empty] { color: var(--dc-text-3); }

.dsel-chev { color: var(--dc-text-2); display: flex; flex: 0 0 auto; }

.dsel-menu {
  position: fixed;
  z-index: 300;
  background: #111318;
  border: 1px solid #2A2E38;
  border-radius: 5px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .5);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: dselIn .1s ease;
}

@keyframes dselIn { from { opacity: 0; transform: translateY(-3px) } to { opacity: 1 } }

.dsel-search {
  margin: 8px;
  padding: 7px 10px;
  border-radius: 4px;
  border: 1px solid #2A2E38;
  background: #0A0C10;
  color: var(--dc-text);
  font: inherit;
  font-size: 13px;
  outline: none;
}
.dsel-search:focus { border-color: var(--blurple); }

.dsel-list { overflow-y: auto; padding: 6px 8px 8px; }
.dsel-list::-webkit-scrollbar { width: 8px; }
.dsel-list::-webkit-scrollbar-thumb { background: #2B2F3A; border-radius: 4px; }

.dsel-opt {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 9px;
  border-radius: 4px;
  cursor: pointer;
  color: var(--dc-text-2);
}
.dsel-opt:hover { background: #2A2E38; color: #fff; }
.dsel-opt[data-on] { color: #fff; }
.dsel-opt[hidden] { display: none; }

.dsel-emoji { flex: 0 0 auto; font-size: 15px; line-height: 1; }
.dsel-emoji:empty { display: none; }

.dsel-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.dsel-opt-label {
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dsel-opt-desc { font-size: 12px; color: var(--dc-text-3); }

.dsel-check { flex: 0 0 auto; color: var(--blurple); opacity: 0; }
.dsel-opt[data-on] .dsel-check { opacity: 1; }

/* --- Menus contextuels --- */

.ctx {
  position: fixed;
  z-index: 400;
  min-width: 196px;
  background: #111318;
  border: 1px solid #2A2E38;
  border-radius: 5px;
  padding: 6px 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .55);
  animation: dselIn .1s ease;
}

.ctx-sub { position: absolute; }

.ctx-head {
  padding: 6px 8px 4px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--dc-text-3);
}

.ctx-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 7px 8px;
  border: 0;
  border-radius: 4px;
  background: none;
  color: var(--dc-text-2);
  font: inherit;
  font-size: 14px;
  text-align: left;
}
.ctx-item > span:first-child { flex: 1; }
.ctx-item:hover:not(:disabled) { background: var(--blurple); color: #fff; }
.ctx-item[data-danger] { color: #ED5A5A; }
.ctx-item[data-danger]:hover { background: #DA373C; color: #fff; }
.ctx-item:disabled { opacity: .45; }

.ctx-icon { font-size: 14px; opacity: .85; }
.ctx-arrow { display: flex; opacity: .7; }
.ctx-sep { height: 1px; background: #2A2E38; margin: 5px 2px; }
