/* =============================================================================
   TUNNEL CREATE CHAT — Layout chat+preview
   Prefix : .tcc-*
   Wood Legendary theme override inclus
   ============================================================================= */

.tcc-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: rgba(0,0,0,0.85);
    backdrop-filter: blur(12px);
    z-index: 99999 !important;
    display: none;
    overflow: hidden;
    transform: none !important;
    max-width: none !important;
}
.tcc-overlay.active {
    display: block !important;
}

.tcc-modal {
    position: absolute !important;
    top: 0 !important; left: 0 !important;
    right: 0 !important; bottom: 0 !important;
    width: 100% !important;
    height: 100% !important;
    display: flex;
    flex-direction: column;
    background: #0e0e18;
    overflow: hidden;
    max-width: none !important;
}

/* ── Header ── */
.tcc-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 24px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.02);
    flex-shrink: 0;
    gap: 16px;
    height: 58px;
}

.tcc-back {
    background: none;
    border: none;
    color: var(--text-muted, #94a3b8);
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    padding: 6px 0;
    transition: color 0.2s;
    white-space: nowrap;
    flex-shrink: 0;
}
.tcc-back:hover { color: var(--text, #fff); }

.tcc-title {
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    justify-content: center;
}

.tcc-title-pulse {
    display: inline-block;
    animation: tcc-pulse 2s ease-in-out infinite;
}
@keyframes tcc-pulse {
    0%,100% { transform: scale(1); filter: drop-shadow(0 0 4px rgba(99,102,241,0.5)); }
    50%      { transform: scale(1.2); filter: drop-shadow(0 0 10px rgba(139,92,246,0.8)); }
}

.tcc-header-right { flex-shrink: 0; }

.tcc-btn-publish {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 20px;
    border-radius: 10px;
    border: none;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s, opacity 0.2s;
    box-shadow: 0 0 20px rgba(99,102,241,0.3);
    animation: tcc-publish-appear 0.4s ease both;
}
@keyframes tcc-publish-appear {
    from { opacity: 0; transform: scale(0.9) translateY(-4px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}
.tcc-btn-publish:hover { transform: translateY(-1px); box-shadow: 0 0 30px rgba(99,102,241,0.5); }
.tcc-btn-publish:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

/* ── Corps ── */
.tcc-body {
    flex: 1;
    display: flex;
    flex-direction: row-reverse;
    min-height: 0;
    overflow: hidden;
    width: 100% !important;
}

/* ── Preview (droite, 60%) ── */
.tcc-preview-pane {
    flex: 0 0 60%;
    display: flex;
    flex-direction: column;
    border-right: 1px solid rgba(255,255,255,0.08);
    background: #0a0a12;
    overflow: hidden;
}

.tcc-preview-topbar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    background: rgba(255,255,255,0.02);
    flex-shrink: 0;
}

.tcc-preview-dots { display: flex; gap: 5px; }
.tcc-preview-dots span { width: 10px; height: 10px; border-radius: 50%; background: rgba(255,255,255,0.15); }
.tcc-preview-dots span:nth-child(1) { background: #ff5f57; }
.tcc-preview-dots span:nth-child(2) { background: #ffbd2e; }
.tcc-preview-dots span:nth-child(3) { background: #28c840; }

.tcc-preview-url {
    flex: 1;
    background: rgba(255,255,255,0.05);
    border-radius: 6px;
    padding: 5px 12px;
    border: 1px solid rgba(255,255,255,0.07);
    display: flex;
    align-items: center;
    justify-content: center;
}
.tcc-url-text { font-size: 12px; font-family: monospace; color: #a5b4fc; }

.tcc-preview-frame { flex: 1; overflow: hidden; position: relative; }
.tcc-preview-frame iframe { position: absolute; top:0; left:0; width:100%; height:100%; border:none; display:block; }

/* ── Empty preview ── */
.tcc-pv-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    min-height: 400px;
    padding: 40px;
    text-align: center;
    color: var(--text-muted, #64748b);
}
.tcc-pv-empty-icon { font-size: 56px; margin-bottom: 20px; opacity: 0.5; }
.tcc-pv-empty h3 { font-size: 20px; font-weight: 700; color: rgba(255,255,255,0.5); margin: 0 0 10px; }
.tcc-pv-empty p  { font-size: 14px; margin: 0 0 32px; line-height: 1.6; }

.tcc-pv-empty-steps {
    display: flex;
    flex-direction: column;
    gap: 10px;
    text-align: left;
    background: rgba(255,255,255,0.04);
    border-radius: 12px;
    padding: 16px 20px;
    border: 1px solid rgba(255,255,255,0.06);
}
.tcc-pv-step { display: flex; align-items: center; gap: 10px; font-size: 13px; color: rgba(255,255,255,0.4); }
.tcc-pv-step span {
    width: 22px; height: 22px; border-radius: 50%;
    background: rgba(99,102,241,0.2); border: 1px solid rgba(99,102,241,0.3);
    display: flex; align-items: center; justify-content: center;
    font-size: 11px; font-weight: 700; color: #a5b4fc; flex-shrink: 0;
}

/* ── Generating preview ── */
.tcc-pv-generating {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    height: 100%; min-height: 400px; padding: 40px; text-align: center;
}
.tcc-pv-gen-anim {
    position: relative; width: 80px; height: 80px;
    display: flex; align-items: center; justify-content: center;
    font-size: 36px; margin-bottom: 24px;
}
.tcc-gen-ring {
    position: absolute; inset: 0; border-radius: 50%;
    border: 2.5px solid transparent;
    border-top-color: #6366f1; border-right-color: #8b5cf6;
    border-bottom-color: rgba(99,102,241,0.15);
    animation: tcc-orbit-main 0.9s cubic-bezier(0.4,0,0.2,1) infinite;
}
.tcc-gen-ring-2 {
    position: absolute; inset: 8px; border-radius: 50%;
    border: 1.5px solid transparent;
    border-top-color: rgba(139,92,246,0.4);
    border-left-color: rgba(99,102,241,0.3);
    animation: tcc-orbit-inner 1.6s linear infinite reverse;
}
.tcc-gen-ring-3 {
    position: absolute; inset: 18px; border-radius: 50%;
    border: 1px dashed rgba(139,92,246,0.2);
    animation: tcc-orbit-main 3s linear infinite;
}
@keyframes tcc-spin { to { transform: rotate(360deg); } }
@keyframes tcc-orbit-main {
    0%   { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
@keyframes tcc-orbit-inner {
    0%   { transform: rotate(0deg) scale(1); }
    50%  { transform: rotate(180deg) scale(0.95); }
    100% { transform: rotate(360deg) scale(1); }
}

.tcc-pv-generating h3 { font-size: 18px; font-weight: 700; color: rgba(255,255,255,0.8); margin: 0 0 24px; }

.tcc-gen-steps { display: flex; flex-direction: column; gap: 8px; text-align: left; width: 100%; max-width: 320px; }
.tcc-gen-step {
    display: flex; align-items: center; gap: 10px;
    font-size: 13px; color: rgba(255,255,255,0.3);
    padding: 8px 14px; border-radius: 8px;
    transition: all 0.3s ease;
}
.tcc-gen-step.active { color: rgba(255,255,255,0.9); background: rgba(99,102,241,0.15); border: 1px solid rgba(99,102,241,0.25); }
.tcc-gen-step.done { color: rgba(16,185,129,0.7); }
.tcc-gen-step.done::before { content: '✓ '; }

/* ── Chat (gauche, 40%) ── */
.tcc-chat-pane {
    flex: 0 0 40%;
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
    background: #0c0c16;
}

.tcc-chat-toolbar {
    display: flex; align-items: center; justify-content: space-between;
    padding: 10px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    flex-shrink: 0;
}

.tcc-phase-badge {
    display: flex; align-items: center; gap: 6px;
    font-size: 12px; font-weight: 600; color: var(--text-muted, #94a3b8);
}
.tcc-phase-dot { width: 7px; height: 7px; border-radius: 50%; background: #475569; }
.tcc-phase-dot.generating { background: #f59e0b; animation: tcc-blink 0.8s ease-in-out infinite; }
.tcc-phase-dot.created   { background: #10b981; animation: tcc-dot-pulse 2s ease-in-out infinite; }
.tcc-phase-dot.published { background: #6366f1; animation: none; }

@keyframes tcc-blink     { 0%,100%{opacity:1} 50%{opacity:0.3} }
@keyframes tcc-dot-pulse { 0%,100%{opacity:1} 50%{opacity:0.5} }

.tcc-messages {
    flex: 1; overflow-y: auto; padding: 20px 16px;
    display: flex; flex-direction: column; gap: 12px; scroll-behavior: smooth;
}
.tcc-messages::-webkit-scrollbar { width: 4px; }
.tcc-messages::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 2px; }

/* ── Welcome ── */
.tcc-welcome {
    display: flex; flex-direction: column; align-items: center;
    text-align: center; padding: 20px 8px 8px;
}
.tcc-welcome-avatar { font-size: 40px; margin-bottom: 12px; }
.tcc-welcome h3 { font-size: 16px; font-weight: 700; color: #fff; margin: 0 0 8px; }
.tcc-welcome p  { font-size: 13px; color: var(--text-muted, #94a3b8); margin: 0 0 16px; line-height: 1.5; }

.tcc-suggestions { display: flex; flex-direction: column; gap: 7px; width: 100%; }
.tcc-suggestion {
    background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08);
    border-radius: 9px; color: rgba(255,255,255,0.75); font-size: 12px;
    padding: 9px 12px; cursor: pointer; text-align: left;
    transition: all 0.2s; line-height: 1.4;
}
.tcc-suggestion:hover { background: rgba(99,102,241,0.12); border-color: rgba(99,102,241,0.3); color: #fff; }

/* ── Messages ── */
.tcc-msg { display: flex; gap: 8px; animation: tcc-msg-in 0.25s ease; }
@keyframes tcc-msg-in { from{opacity:0;transform:translateY(8px)} to{opacity:1;transform:translateY(0)} }

.tcc-msg-user { flex-direction: row-reverse; }
.tcc-msg-user .tcc-bubble {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff; border-radius: 16px 16px 4px 16px; max-width: 85%; align-self: flex-end;
}
.tcc-msg-bot { align-items: flex-start; }
.tcc-bot-av {
    width: 30px; height: 30px; border-radius: 50%;
    background: rgba(99,102,241,0.2); border: 1px solid rgba(99,102,241,0.3);
    display: flex; align-items: center; justify-content: center; font-size: 16px; flex-shrink: 0;
}
.tcc-msg-bot .tcc-bubble {
    background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.9); border-radius: 4px 16px 16px 16px; flex: 1;
}
.tcc-msg-error .tcc-bubble { background: rgba(239,68,68,0.1); border-color: rgba(239,68,68,0.2); }
.tcc-bubble { padding: 10px 14px; font-size: 13px; line-height: 1.6; word-break: break-word; }

.tcc-dots { display: flex; gap: 5px; align-items: center; height: 18px; }
.tcc-dots span {
    width: 6px; height: 6px; border-radius: 50%;
    background: rgba(255,255,255,0.4); animation: tcc-dot 1.4s ease-in-out infinite;
}
.tcc-dots span:nth-child(2) { animation-delay: 0.2s; }
.tcc-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes tcc-dot { 0%,80%,100%{transform:scale(0.8);opacity:0.4} 40%{transform:scale(1.1);opacity:1} }

/* ── Input ── */
.tcc-input-area {
    padding: 14px 16px; border-top: 1px solid rgba(255,255,255,0.06);
    flex-shrink: 0; background: rgba(255,255,255,0.02);
}
.tcc-input-row { display: flex; gap: 10px; align-items: flex-end; }
.tcc-input {
    flex: 1; background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px; color: #fff; font-size: 14px; padding: 10px 14px;
    resize: none; font-family: inherit; line-height: 1.5; transition: border-color 0.2s;
    min-height: 44px; max-height: 140px; overflow-y: auto;
}
.tcc-input:focus { outline: none; border-color: rgba(99,102,241,0.5); background: rgba(255,255,255,0.08); }
.tcc-input::placeholder { color: rgba(255,255,255,0.3); }
.tcc-input:disabled { opacity: 0.5; cursor: not-allowed; }

.tcc-send {
    width: 44px; height: 44px; border-radius: 12px; border: none;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center;
    flex-shrink: 0; transition: transform 0.2s, box-shadow 0.2s, opacity 0.2s;
}
.tcc-send:hover { transform: scale(1.05); box-shadow: 0 0 14px rgba(99,102,241,0.4); }
.tcc-send:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.tcc-send.loading {
    background: rgba(99,102,241,0.12) !important;
    border: 1px solid rgba(99,102,241,0.25) !important;
    box-shadow: none !important;
    position: relative;
    overflow: hidden;
    cursor: not-allowed;
    animation: none;
}
.tcc-send.loading svg { opacity: 0; }
.tcc-send.loading::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent 0%, rgba(139,92,246,0.4) 50%, transparent 100%);
    transform: translateX(-100%);
    animation: tcc-shimmer 1.3s ease-in-out infinite;
}
.tcc-send.loading::after { display: none; }
@keyframes tcc-shimmer {
    0%   { transform: translateX(-100%); }
    100% { transform: translateX(200%); }
}

.tcc-input-hint { font-size: 11px; color: rgba(255,255,255,0.3); margin-top: 8px; text-align: center; transition: color 0.3s; }

/* ── Overlay succès publication ── */
.tcc-publish-success {
    position: absolute; inset: 0; background: rgba(0,0,0,0.88);
    backdrop-filter: blur(16px); z-index: 10;
    display: flex; align-items: center; justify-content: center; padding: 24px;
    animation: tcc-fade-in 0.3s ease;
}
@keyframes tcc-fade-in { from{opacity:0} to{opacity:1} }

.tcc-success-card {
    background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.12);
    border-radius: 24px; padding: 48px 40px; max-width: 480px; width: 100%;
    text-align: center; animation: tcc-success-pop 0.4s cubic-bezier(0.34,1.56,0.64,1);
}
@keyframes tcc-success-pop { from{transform:scale(0.8);opacity:0} to{transform:scale(1);opacity:1} }

.tcc-success-icon { font-size: 64px; margin-bottom: 20px; animation: tcc-bounce 0.6s ease 0.2s both; }
@keyframes tcc-bounce {
    0%  { transform: translateY(-20px) scale(0.8); opacity:0; }
    60% { transform: translateY(6px) scale(1.1); }
    100%{ transform: translateY(0) scale(1); opacity:1; }
}
.tcc-success-title {
    font-size: 28px; font-weight: 900; color: #fff; margin: 0 0 10px;
    background: linear-gradient(135deg, #fff, #a5b4fc);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.tcc-success-sub { font-size: 15px; color: rgba(255,255,255,0.6); margin: 0 0 28px; }

.tcc-success-url {
    background: rgba(99,102,241,0.1); border: 1px solid rgba(99,102,241,0.25);
    border-radius: 12px; padding: 12px 16px; margin-bottom: 28px;
}
.tcc-success-url-inner { display: flex; align-items: center; gap: 10px; justify-content: center; flex-wrap: wrap; }
.tcc-success-url-text { font-family: monospace; font-size: 14px; color: #a5b4fc; word-break: break-all; }
.tcc-success-url-copy {
    background: rgba(99,102,241,0.2); border: 1px solid rgba(99,102,241,0.3);
    border-radius: 7px; color: #a5b4fc; font-size: 12px; padding: 5px 10px;
    cursor: pointer; transition: background 0.2s; white-space: nowrap;
}
.tcc-success-url-copy:hover { background: rgba(99,102,241,0.35); }

.tcc-success-actions { display: flex; flex-direction: column; gap: 10px; }
.tcc-btn {
    padding: 12px 20px; border-radius: 12px; font-size: 14px; font-weight: 600;
    cursor: pointer; transition: all 0.2s; border: 1px solid transparent; width: 100%;
}
.tcc-btn-primary { background: linear-gradient(135deg, #6366f1, #8b5cf6); color: #fff; border: none; }
.tcc-btn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(99,102,241,0.4); }
.tcc-btn-secondary { background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.12); color: rgba(255,255,255,0.8); }
.tcc-btn-secondary:hover { background: rgba(255,255,255,0.1); color: #fff; }
.tcc-btn-ghost { background: none; border-color: transparent; color: rgba(255,255,255,0.4); }
.tcc-btn-ghost:hover { color: rgba(255,255,255,0.7); }

/* ── Responsive ── */
@media (max-width: 768px) {
    .tcc-body { flex-direction: column; }
    .tcc-preview-pane { flex: 0 0 50%; border-right: none; border-bottom: 1px solid rgba(255,255,255,0.08); }
    .tcc-chat-pane { flex: 0 0 50%; }
}

/* =============================================================================
   WOOD LEGENDARY OVERRIDE — Tunnel Create Chat
   Pose le bois sur tout le modal
   ============================================================================= */

[data-theme="wood-legendary"] .tcc-modal {
    background-color: #2C1E12 !important;
    background-image: url('textures/wood-dark.jpg?v=1774293320') !important;
    background-size: cover !important;
    background-position: center top !important;
    background-attachment: scroll !important;
}

[data-theme="wood-legendary"] .tcc-header {
    background: rgba(30,20,12,0.92) !important;
    border-bottom-color: rgba(212,164,76,0.15) !important;
    backdrop-filter: blur(8px);
}

[data-theme="wood-legendary"] .tcc-back {
    color: #9A7D5E !important;
}
[data-theme="wood-legendary"] .tcc-back:hover { color: #F2E8D8 !important; }

[data-theme="wood-legendary"] .tcc-title {
    color: #F2E8D8 !important;
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

[data-theme="wood-legendary"] .tcc-title-pulse {
    filter: drop-shadow(0 0 6px rgba(212,164,76,0.6));
}

[data-theme="wood-legendary"] .tcc-btn-publish {
    background: linear-gradient(135deg, #D4A44C, #E0B860) !important;
    color: #1E140C !important;
    font-weight: 800 !important;
    box-shadow: 0 0 20px rgba(212,164,76,0.35) !important;
}
[data-theme="wood-legendary"] .tcc-btn-publish:hover {
    box-shadow: 0 0 30px rgba(212,164,76,0.55) !important;
}

/* Preview pane — bois clair */
[data-theme="wood-legendary"] .tcc-preview-pane {
    background-color: #3A2A1A !important;
    background-image: url('textures/wood-light-premium.jpg?v=1774293320') !important;
    background-size: cover !important;
    background-position: center !important;
    border-right-color: rgba(212,164,76,0.15) !important;
}

[data-theme="wood-legendary"] .tcc-preview-topbar {
    background: rgba(44,30,18,0.88) !important;
    border-bottom-color: rgba(212,164,76,0.10) !important;
    backdrop-filter: blur(6px);
}

[data-theme="wood-legendary"] .tcc-preview-url {
    background: rgba(44,30,18,0.6) !important;
    border-color: rgba(212,164,76,0.15) !important;
}
[data-theme="wood-legendary"] .tcc-url-text { color: #D4A44C !important; }

[data-theme="wood-legendary"] .tcc-preview-frame {
    background: transparent !important;
}

/* Empty preview */
[data-theme="wood-legendary"] .tcc-pv-empty {
    background: transparent !important;
}
[data-theme="wood-legendary"] .tcc-pv-empty h3 { color: rgba(242,232,216,0.6) !important; }
[data-theme="wood-legendary"] .tcc-pv-empty p  { color: #9A7D5E !important; }
[data-theme="wood-legendary"] .tcc-pv-empty-steps {
    background: rgba(44,30,18,0.65) !important;
    border-color: rgba(212,164,76,0.12) !important;
}
[data-theme="wood-legendary"] .tcc-pv-step { color: rgba(242,232,216,0.45) !important; }
[data-theme="wood-legendary"] .tcc-pv-step span {
    background: rgba(212,164,76,0.15) !important;
    border-color: rgba(212,164,76,0.3) !important;
    color: #D4A44C !important;
}

/* Generating */
[data-theme="wood-legendary"] .tcc-gen-ring {
    border-top-color: #D4A44C !important;
    border-right-color: #E0B860 !important;
}
/* Fond sombre sur le container de génération pour lisibilité sur bois clair */
[data-theme="wood-legendary"] .tcc-pv-generating {
    background: rgba(20,12,4,0.72) !important;
    border-radius: 16px !important;
    margin: 24px !important;
    height: auto !important;
    min-height: 360px !important;
    backdrop-filter: blur(6px) !important;
    box-shadow: 0 4px 32px rgba(0,0,0,0.35) !important;
}
[data-theme="wood-legendary"] .tcc-pv-generating h3 { color: #F2E8D8 !important; }
[data-theme="wood-legendary"] .tcc-gen-ring { border-top-color: #D4A44C !important; border-right-color: #C4903C !important; }
[data-theme="wood-legendary"] .tcc-gen-step { color: rgba(242,232,216,0.55) !important; }
[data-theme="wood-legendary"] .tcc-gen-step.active {
    color: #F2E8D8 !important;
    background: rgba(212,164,76,0.2) !important;
    border-color: rgba(212,164,76,0.45) !important;
}
[data-theme="wood-legendary"] .tcc-gen-step.done { color: #8BC67A !important; font-weight: 600 !important; }

/* Chat pane — bois moyen-foncé avec légère transparence */
[data-theme="wood-legendary"] .tcc-chat-pane {
    background-color: #241A0E !important;
    background-image: url('textures/wood-body.jpg?v=1774293320') !important;
    background-size: cover !important;
    background-position: center !important;
}

[data-theme="wood-legendary"] .tcc-chat-toolbar {
    background: rgba(30,20,12,0.75) !important;
    border-bottom-color: rgba(212,164,76,0.10) !important;
    backdrop-filter: blur(4px);
}

[data-theme="wood-legendary"] .tcc-phase-badge { color: #9A7D5E !important; }
[data-theme="wood-legendary"] .tcc-phase-dot { background: #6A5040 !important; }
[data-theme="wood-legendary"] .tcc-phase-dot.generating { background: #D4A44C !important; }
[data-theme="wood-legendary"] .tcc-phase-dot.created    { background: #7A9E5A !important; }
[data-theme="wood-legendary"] .tcc-phase-dot.published  { background: #D4A44C !important; }

[data-theme="wood-legendary"] .tcc-messages::-webkit-scrollbar-thumb {
    background: rgba(212,164,76,0.2) !important;
}

/* Welcome */
[data-theme="wood-legendary"] .tcc-welcome h3 { color: #F2E8D8 !important; }
[data-theme="wood-legendary"] .tcc-welcome p  { color: #9A7D5E !important; }
[data-theme="wood-legendary"] .tcc-suggestion {
    background: rgba(44,30,18,0.65) !important;
    border-color: rgba(212,164,76,0.15) !important;
    color: rgba(242,232,216,0.75) !important;
}
[data-theme="wood-legendary"] .tcc-suggestion:hover {
    background: rgba(212,164,76,0.15) !important;
    border-color: rgba(212,164,76,0.4) !important;
    color: #F2E8D8 !important;
}

/* Messages */
[data-theme="wood-legendary"] .tcc-msg-user .tcc-bubble {
    background: linear-gradient(135deg, #D4A44C, #C08030) !important;
    color: #1E140C !important;
}
[data-theme="wood-legendary"] .tcc-bot-av {
    background: rgba(212,164,76,0.15) !important;
    border-color: rgba(212,164,76,0.3) !important;
}
[data-theme="wood-legendary"] .tcc-msg-bot .tcc-bubble {
    background: rgba(44,30,18,0.70) !important;
    border-color: rgba(212,164,76,0.12) !important;
    color: #DCC8A8 !important;
}
[data-theme="wood-legendary"] .tcc-msg-error .tcc-bubble {
    background: rgba(192,96,64,0.15) !important;
    border-color: rgba(192,96,64,0.3) !important;
}

/* Dots */
[data-theme="wood-legendary"] .tcc-dots span { background: rgba(212,164,76,0.4) !important; }

/* Input area */
[data-theme="wood-legendary"] .tcc-input-area {
    background: rgba(30,20,12,0.80) !important;
    border-top-color: rgba(212,164,76,0.12) !important;
    backdrop-filter: blur(4px);
}
[data-theme="wood-legendary"] .tcc-input {
    background: rgba(36,26,14,0.85) !important;
    border-color: rgba(212,164,76,0.2) !important;
    color: #F2E8D8 !important;
}
[data-theme="wood-legendary"] .tcc-input:focus {
    border-color: rgba(212,164,76,0.5) !important;
    background: rgba(36,26,14,0.95) !important;
}
[data-theme="wood-legendary"] .tcc-input::placeholder { color: rgba(154,125,94,0.6) !important; }

[data-theme="wood-legendary"] .tcc-send {
    background: linear-gradient(135deg, #D4A44C, #B8860B) !important;
    color: #1E140C !important;
}
[data-theme="wood-legendary"] .tcc-send:hover {
    box-shadow: 0 0 14px rgba(212,164,76,0.5) !important;
}
[data-theme="wood-legendary"] .tcc-input-hint { color: rgba(154,125,94,0.6) !important; }

/* Publish success overlay */
[data-theme="wood-legendary"] .tcc-publish-success {
    background: rgba(20,12,6,0.92) !important;
}
[data-theme="wood-legendary"] .tcc-success-card {
    background: rgba(44,30,18,0.95) !important;
    background-image: url('textures/wood-medium.jpg?v=1774293320') !important;
    background-size: cover !important;
    background-position: center !important;
    border-color: rgba(212,164,76,0.2) !important;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,220,140,0.1) !important;
}
[data-theme="wood-legendary"] .tcc-success-title {
    background: linear-gradient(135deg, #F2E8D8, #D4A44C) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    background-clip: text !important;
}
[data-theme="wood-legendary"] .tcc-success-sub { color: #9A7D5E !important; }
[data-theme="wood-legendary"] .tcc-success-url {
    background: rgba(212,164,76,0.08) !important;
    border-color: rgba(212,164,76,0.2) !important;
}
[data-theme="wood-legendary"] .tcc-success-url-text { color: #D4A44C !important; }
[data-theme="wood-legendary"] .tcc-success-url-copy {
    background: rgba(212,164,76,0.15) !important;
    border-color: rgba(212,164,76,0.3) !important;
    color: #D4A44C !important;
}
[data-theme="wood-legendary"] .tcc-btn-primary {
    background: linear-gradient(135deg, #D4A44C, #C08030) !important;
    color: #1E140C !important;
    font-weight: 800 !important;
}
[data-theme="wood-legendary"] .tcc-btn-secondary {
    background: rgba(44,30,18,0.6) !important;
    border-color: rgba(212,164,76,0.2) !important;
    color: #DCC8A8 !important;
}
[data-theme="wood-legendary"] .tcc-btn-ghost { color: rgba(154,125,94,0.6) !important; }
[data-theme="wood-legendary"] .tcc-btn-ghost:hover { color: #9A7D5E !important; }

[data-theme="wood-legendary"] .tcc-overlay.active {
    position: fixed !important;
    top: 0 !important; left: 0 !important;
    right: 0 !important; bottom: 0 !important;
    width: 100% !important;
    height: 100% !important;
    z-index: 99999 !important;
    display: flex !important;
    align-items: stretch !important;
    overflow: hidden !important;
    transform: none !important;
}

/* ── Giri Store picker ── */
.tcc-store-picker { margin-top: 16px; width: 100%; }
.tcc-store-picker-title {
    font-size: 13px; font-weight: 700; color: rgba(255,255,255,0.85);
    margin-bottom: 6px; display: flex; align-items: center; gap: 6px;
}
.tcc-store-picker-sub { font-size: 12px; color: rgba(255,255,255,0.45); margin-bottom: 10px; }
.tcc-store-products-list { display: flex; flex-direction: column; gap: 6px; }
.tcc-store-product-btn {
    display: flex; align-items: center; gap: 10px;
    background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.08);
    border-radius: 10px; padding: 8px 12px; cursor: pointer; width: 100%;
    transition: all 0.2s; text-align: left;
}
.tcc-store-product-btn:hover {
    background: rgba(99,102,241,0.12); border-color: rgba(99,102,241,0.3);
}
.tcc-sp-thumb {
    width: 36px; height: 36px; border-radius: 6px; flex-shrink: 0;
    background: rgba(99,102,241,0.15); display: flex; align-items: center;
    justify-content: center; font-size: 1.1rem; overflow: hidden;
}
.tcc-sp-info { flex: 1; overflow: hidden; }
.tcc-sp-name { font-size: 13px; font-weight: 600; color: rgba(255,255,255,0.9); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tcc-sp-meta { font-size: 11px; color: rgba(255,255,255,0.4); margin-top: 2px; }
.tcc-store-skip {
    background: none; border: none; color: rgba(255,255,255,0.3);
    font-size: 11px; cursor: pointer; margin-top: 8px; padding: 4px 0;
    text-align: center; width: 100%; transition: color 0.2s;
}
.tcc-store-skip:hover { color: rgba(255,255,255,0.6); }

/* Wood legendary store */
[data-theme=wood-legendary] .tcc-store-product-btn {
    background: rgba(44,30,18,0.65) !important;
    border-color: rgba(212,164,76,0.15) !important;
}
[data-theme=wood-legendary] .tcc-store-product-btn:hover {
    background: rgba(212,164,76,0.12) !important;
    border-color: rgba(212,164,76,0.35) !important;
}
[data-theme=wood-legendary] .tcc-sp-thumb { background: rgba(212,164,76,0.15) !important; }
[data-theme=wood-legendary] .tcc-sp-name { color: #F2E8D8 !important; }
[data-theme=wood-legendary] .tcc-sp-meta { color: #9A7D5E !important; }
[data-theme=wood-legendary] .tcc-store-picker-title { color: #DCC8A8 !important; }
[data-theme=wood-legendary] .tcc-store-picker-sub { color: #9A7D5E !important; }
[data-theme=wood-legendary] .tcc-store-skip { color: rgba(154,125,94,0.5) !important; }
[data-theme=wood-legendary] .tcc-store-skip:hover { color: #9A7D5E !important; }

/* ── Bouton image ── */
.tcc-img-btn {
    width: 44px; height: 44px; border-radius: 12px; border: 1px solid rgba(255,255,255,0.12);
    background: rgba(255,255,255,0.06); color: rgba(255,255,255,0.5);
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    flex-shrink: 0; transition: all 0.2s;
}
.tcc-img-btn:hover { background: rgba(255,255,255,0.12); color: #fff; border-color: rgba(255,255,255,0.25); }
[data-theme="wood-legendary"] .tcc-img-btn {
    background: rgba(44,30,18,0.65) !important; border-color: rgba(212,164,76,0.2) !important; color: #9A7D5E !important;
}
[data-theme="wood-legendary"] .tcc-img-btn:hover { background: rgba(212,164,76,0.15) !important; color: #D4A44C !important; }

/* ═══════════════════════════════════════════════════════════════════════════
   ENRICH TOOLBAR — Outils d'enrichissement du tunnel
   ═══════════════════════════════════════════════════════════════════════════ */
.tcc-enrich-toolbar {
    display: none;
    flex-direction: column;
    gap: 6px;
    padding: 10px 14px;
    border-top: 1px solid rgba(255,255,255,0.07);
    border-bottom: 1px solid rgba(255,255,255,0.07);
    background: rgba(0,0,0,0.15);
    flex-shrink: 0;
}
.tcc-enrich-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.3);
}
.tcc-enrich-tools {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}
.tcc-tool-btn {
    padding: 5px 10px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.05);
    color: rgba(255,255,255,0.65);
    font-size: 12px;
    cursor: pointer;
    transition: all 0.18s;
    white-space: nowrap;
    line-height: 1.4;
}
.tcc-tool-btn:hover {
    background: rgba(99,102,241,0.18);
    border-color: rgba(99,102,241,0.4);
    color: #fff;
    transform: translateY(-1px);
}
.tcc-tool-btn:active { transform: translateY(0); }

/* Wood-legendary toolbar */
[data-theme=wood-legendary] .tcc-enrich-toolbar {
    background: rgba(20,12,6,0.6) !important;
    border-color: rgba(212,164,76,0.12) !important;
}
[data-theme=wood-legendary] .tcc-enrich-label {
    color: rgba(154,125,94,0.7) !important;
}
[data-theme=wood-legendary] .tcc-tool-btn {
    background: rgba(44,30,18,0.6) !important;
    border-color: rgba(212,164,76,0.15) !important;
    color: #9A7D5E !important;
}
[data-theme=wood-legendary] .tcc-tool-btn:hover {
    background: rgba(212,164,76,0.15) !important;
    border-color: rgba(212,164,76,0.4) !important;
    color: #D4A44C !important;
}

/* ── Joke box pendant génération ── */
.tcc-joke-box {
    margin-top: 32px;
    padding: 18px 22px;
    background: rgba(139,92,246,0.06);
    border: 1px solid rgba(139,92,246,0.15);
    border-radius: 16px;
    text-align: center;
    max-width: 300px;
    margin-left: auto;
    margin-right: auto;
    animation: tcc-joke-appear 0.6s cubic-bezier(0.34,1.56,0.64,1) forwards;
}
@keyframes tcc-joke-appear {
    0%   { opacity: 0; transform: translateY(14px) scale(0.95); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}
.tcc-joke-label {
    display: block;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: rgba(139,92,246,0.4);
    margin-bottom: 10px;
}
.tcc-joke-text {
    font-size: 13px;
    color: rgba(255,255,255,0.65);
    line-height: 1.6;
    font-style: italic;
    min-height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s ease, transform 0.3s ease;
}
.tcc-joke-text.joke-out {
    opacity: 0;
    transform: translateY(-5px);
}
.tcc-joke-text.joke-in {
    opacity: 0;
    transform: translateY(7px);
    transition: none;
}

