/* ============================================
   R&D MODULE - Styles dédiés
   ============================================ */

/* ============================================
   1. VARIABLES R&D
   ============================================ */
:root {
    --rnd-bg: #13151a;
    --rnd-bg-card: #1c1f26;
    --rnd-bg-field: #252830;
    --rnd-bg-input: #1c1f26;
    --rnd-border: rgba(255, 255, 255, 0.08);
    --rnd-border-hover: rgba(255, 255, 255, 0.15);
    --rnd-accent: #c9a962;
    --rnd-accent-hover: #d4b56d;
    --rnd-gold: #d4af37;
    --rnd-gold-soft: #e8d5a3;
    --rnd-gold-dim: rgba(212, 175, 55, 0.25);
    --rnd-cyan: #00d4ff;
    --rnd-emerald: #00c896;
    --rnd-text: #f0f0f0;
    --rnd-text-dim: #8a919e;
    --rnd-text-muted: #555b69;
    --rnd-text-secondary: #aaaaaa;
    --rnd-text-placeholder: #3d4350;

    /* Node colors (--rnd-{slug}, -soft, -dim, -glow, -grad, -deep)
       are injected dynamically by node-color-engine.js from MongoDB */

    /* Statuts */
    --rnd-status-idea: #8b7fdb;
    --rnd-status-test: #e6a756;
    --rnd-status-valid: #5fba7d;
    --rnd-status-menu: #c9a962;
}

/* ============================================
   2. ANIMATION HEADER - Transition R&D Mode
   ============================================ */

/* État normal de l'icône R&D */
.rd-logo-icon {
    cursor: pointer;
    transition: all 0.4s ease;
    position: relative;
    z-index: 10;
}

.rd-logo-icon:hover {
    transform: scale(1.1);
}

/* Mode R&D actif - Animation header (user + admin) */
body.rnd-mode-active #app-header,
body.rnd-mode-active #app-section > header {
    background: var(--rnd-bg) !important;
    border-bottom: 1px solid var(--rnd-border);
    justify-content: center;
    position: relative;
}

body.rnd-mode-active .header-logo {
    opacity: 0;
    width: 0;
    pointer-events: none;
    transition: all 0.4s ease;
}

body.rnd-mode-active .rd-logo-icon {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%) scale(1.4);
    transition: all 0.4s ease;
    color: #c9a962;
    background: linear-gradient(135deg, #1c1f26 0%, #13151a 100%);
    border: 1px solid #c9a96240;
}

body.rnd-mode-active .rd-logo-icon svg {
    width: 32px;
    height: 32px;
    color: #c9a962;
    stroke: #c9a962;
}

body.rnd-mode-active #theme-toggle {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

/* Cacher username et déconnexion en mode R&D */
body.rnd-mode-active .header-right {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

body.rnd-mode-active #app-header .header-left,
body.rnd-mode-active #app-section > header .header-left {
    position: static;
}

/* Cacher la nav principale en mode R&D (user + admin) */
body.rnd-mode-active #main-nav,
body.rnd-mode-active #admin-nav {
    display: none;
}

body.rnd-mode-active #app-section-content {
    display: none;
}

/* Cacher les vues admin en mode R&D */
body.rnd-mode-active .view {
    display: none !important;
}

body.rnd-mode-active #mylist-open-btn {
    display: none !important;
}

/* ============================================
   2b. MODE NODES FULLSCREEN
   Quand on est en création nodale, masquer tout sauf le header R&D
   ============================================ */
body.rnd-nodes-fullscreen #app-header {
    display: none !important;
}

body.rnd-nodes-fullscreen #main-nav {
    display: none !important;
}

body.rnd-nodes-fullscreen .rnd-tabs {
    display: none !important;
}

body.rnd-nodes-fullscreen #rnd-tab-timeline {
    display: none !important;
}

/* Cacher filtres et recherche en mode nodes fullscreen */
body.rnd-nodes-fullscreen .rnd-search-filters {
    display: none !important;
}

/* Cacher la sidebar (liste projets) en mode nodes fullscreen */
body.rnd-nodes-fullscreen .rnd-sidebar {
    display: none !important;
}

/* Cacher le FAB (bouton + nouveau projet) en mode nodes fullscreen */
body.rnd-nodes-fullscreen .rnd-fab {
    display: none !important;
}

/* Header R&D en mode nodes fullscreen */
body.rnd-nodes-fullscreen .rnd-header {
    padding: 16px 20px;
    position: relative;
}

body.rnd-nodes-fullscreen .rnd-header h1 {
    font-size: 22px;
}

body.rnd-nodes-fullscreen .rnd-header .rnd-subtitle {
    font-size: 12px;
}

/* Bouton retour dans le header R&D */
body.rnd-nodes-fullscreen .rnd-header .rnd-nodes-back-btn {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: 1px solid var(--rnd-border);
    color: var(--rnd-text-muted);
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

body.rnd-nodes-fullscreen .rnd-header .rnd-nodes-back-btn:hover {
    border-color: var(--rnd-accent);
    color: var(--rnd-accent);
}

/* Detail content prend toute la hauteur */
body.rnd-nodes-fullscreen #rnd-module {
    min-height: 100vh;
}

body.rnd-nodes-fullscreen .rnd-content {
    height: 100vh;
}

body.rnd-nodes-fullscreen .rnd-detail {
    display: block !important;
    width: 100% !important;
    height: 100%;
}

body.rnd-nodes-fullscreen .rnd-list {
    display: none !important;
}

/* Cacher le header de vue interne (Retour + nom projet) */
body.rnd-nodes-fullscreen .rnd-view-header {
    display: none !important;
}

/* Nodes container prend toute la place */
body.rnd-nodes-fullscreen .rnd-nodes-container {
    height: 100%;
}

body.rnd-nodes-fullscreen #rnd-tab-nodes {
    flex: 1;
    min-height: 0;
}

body.rnd-nodes-fullscreen .rnd-nodes-view {
    height: 100%;
    padding: 0;
}

/* React Flow editor container */
body.rnd-nodes-fullscreen #rnd-react-editor-root {
    width: 100%;
    height: 100%;
}

/* Éditeur de nodes en fullscreen */
body.rnd-nodes-fullscreen .nodes-editor {
    height: 100% !important;
}

body.rnd-nodes-fullscreen #rnd-detail-content {
    height: 100%;
}

/* ============================================
   3. CONTAINER MODULE R&D
   ============================================ */
#rnd-module {
    display: none;
    background: var(--rnd-bg);
    min-height: calc(100vh - 60px);
    color: var(--rnd-text);
}

body.rnd-mode-active #rnd-module {
    display: block;
}

/* ============================================
   4. HEADER DU MODULE R&D
   ============================================ */
.rnd-header {
    padding: 24px 20px;
    text-align: center;
    border-bottom: 1px solid var(--rnd-border);
}

.rnd-header h1 {
    font-size: 28px;
    font-weight: 700;
    margin: 0 0 8px 0;
    letter-spacing: 1px;
}

.rnd-header h1 .rnd-accent {
    color: var(--rnd-accent);
}

.rnd-header .rnd-subtitle {
    font-size: 14px;
    color: var(--rnd-text-muted);
    margin: 0;
    font-weight: 400;
}

/* Bouton retour */
.rnd-back-btn {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: 1px solid var(--rnd-border);
    color: var(--rnd-text-muted);
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.rnd-back-btn:hover {
    border-color: var(--rnd-accent);
    color: var(--rnd-accent);
}

/* ============================================
   5. ONGLETS R&D (Fiche | Timeline | Nodes)
   ============================================ */
.rnd-tabs {
    display: flex;
    justify-content: center;
    gap: 0;
    padding: 16px 20px;
    border-bottom: 1px solid var(--rnd-border);
    background: var(--rnd-bg);
}

.rnd-tab-btn {
    background: transparent;
    border: none;
    color: var(--rnd-text-muted);
    font-size: 14px;
    font-weight: 500;
    padding: 10px 24px;
    cursor: pointer;
    position: relative;
    transition: color 0.2s ease;
}

.rnd-tab-btn:hover {
    color: var(--rnd-text-secondary);
}

.rnd-tab-btn.active {
    color: var(--rnd-accent);
}

.rnd-tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 2px;
    background: var(--rnd-accent);
    border-radius: 2px;
}

/* Séparateurs entre onglets */
.rnd-tab-btn:not(:last-child)::before {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 1px;
    height: 16px;
    background: var(--rnd-border);
}

/* ============================================
   5.5. JAUGE D'ÉTAPES
   ============================================ */
.rnd-step-gauge {
    padding: 16px 20px;
    background: var(--rnd-bg);
    border-bottom: 1px solid var(--rnd-border);
}

.rnd-step-gauge-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.rnd-step-gauge-title {
    font-size: 12px;
    font-weight: 500;
    color: var(--rnd-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.rnd-step-gauge-current {
    font-size: 14px;
    font-weight: 600;
    color: var(--rnd-accent);
}

.rnd-step-gauge-track {
    position: relative;
    height: 8px;
    background: var(--rnd-border);
    border-radius: 4px;
    overflow: visible;
}

.rnd-step-gauge-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: linear-gradient(90deg, var(--rnd-accent), #d4b56d);
    border-radius: 4px;
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 8px rgba(201, 169, 98, 0.4);
}

.rnd-step-gauge-steps {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    padding: 0 2px;
}

.rnd-step-gauge-marker {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--rnd-bg-card);
    border: 2px solid var(--rnd-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
    font-weight: 700;
    color: var(--rnd-text-muted);
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
}

.rnd-step-gauge-marker.completed {
    background: var(--rnd-accent);
    border-color: var(--rnd-accent);
    color: #000;
}

.rnd-step-gauge-marker.current {
    background: var(--rnd-bg);
    border-color: var(--rnd-accent);
    color: var(--rnd-accent);
    box-shadow: 0 0 0 3px rgba(201, 169, 98, 0.2);
    animation: pulse-step 2s infinite;
}

.rnd-step-gauge-marker.locked {
    opacity: 0.5;
}

@keyframes pulse-step {
    0%, 100% {
        box-shadow: 0 0 0 3px rgba(201, 169, 98, 0.2);
    }
    50% {
        box-shadow: 0 0 0 6px rgba(201, 169, 98, 0.1);
    }
}

.rnd-step-gauge-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
    padding: 0 2px;
}

.rnd-step-gauge-label {
    font-size: 10px;
    color: var(--rnd-text-muted);
    text-align: center;
    width: 16px;
    transition: color 0.3s ease;
}

.rnd-step-gauge-label.completed {
    color: var(--rnd-accent);
}

.rnd-step-gauge-label.current {
    color: var(--rnd-text);
    font-weight: 600;
}

/* ============================================
   6. BARRE DE RECHERCHE & FILTRES
   ============================================ */
.rnd-search-filters {
    padding: 16px 20px;
    border-bottom: 1px solid var(--rnd-border);
}

.rnd-search-wrapper {
    position: relative;
    margin-bottom: 12px;
}

.rnd-search-input {
    width: 100%;
    background: var(--rnd-bg-card);
    border: 1px solid var(--rnd-border);
    border-radius: 10px;
    padding: 12px 16px 12px 44px;
    font-size: 15px;
    color: var(--rnd-text);
    outline: none;
    transition: border-color 0.2s ease;
}

.rnd-search-input::placeholder {
    color: var(--rnd-text-muted);
}

.rnd-search-input:focus {
    border-color: var(--rnd-accent);
}

.rnd-search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--rnd-text-muted);
    font-size: 16px;
}

/* Filtres par statut */
.rnd-filters {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

/* Bouton nouveau projet */
.rnd-new-project-btn {
    background: var(--rnd-accent);
    border: 1px solid var(--rnd-accent);
    border-radius: 20px;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 600;
    color: #000;
    cursor: pointer;
    transition: all 0.2s ease;
}

.rnd-new-project-btn:hover {
    background: var(--rnd-accent-hover);
    border-color: var(--rnd-accent-hover);
    transform: translateY(-1px);
}

.rnd-filter-btn {
    background: var(--rnd-bg-card);
    border: 1px solid var(--rnd-border);
    border-radius: 20px;
    padding: 8px 16px;
    font-size: 13px;
    color: var(--rnd-text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
}

.rnd-filter-btn:hover {
    border-color: var(--rnd-text-muted);
}

.rnd-filter-btn.active {
    background: var(--rnd-accent);
    border-color: var(--rnd-accent);
    color: #000;
    font-weight: 500;
}

/* Filtres avec couleur spécifique */
.rnd-filter-btn[data-status="idea"].active {
    background: var(--rnd-status-idea);
    border-color: var(--rnd-status-idea);
    color: #fff;
}

.rnd-filter-btn[data-status="test"].active {
    background: var(--rnd-status-test);
    border-color: var(--rnd-status-test);
    color: #000;
}

.rnd-filter-btn[data-status="valid"].active {
    background: var(--rnd-status-valid);
    border-color: var(--rnd-status-valid);
    color: #fff;
}

.rnd-filter-btn[data-status="menu"].active {
    background: var(--rnd-status-menu);
    border-color: var(--rnd-status-menu);
    color: #000;
}

/* ============================================
   7. LAYOUT DESKTOP - SIDEBAR + DETAIL
   ============================================ */
.rnd-content {
    display: flex;
    height: calc(100vh - 200px);
}

/* Sidebar liste projets */
.rnd-sidebar {
    width: 320px;
    border-right: 1px solid var(--rnd-border);
    overflow-y: auto;
    flex-shrink: 0;
}

/* Vue détail */
.rnd-detail {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
}

.rnd-detail-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--rnd-text-muted);
}

.rnd-detail-empty-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.rnd-detail-empty p {
    font-size: 15px;
}

/* ============================================
   8. CARDS PROJET (Liste)
   ============================================ */
.rnd-projects-list {
    padding: 12px;
}

.rnd-project-card {
    background: var(--rnd-bg-card);
    border: 1px solid var(--rnd-border);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.rnd-project-card:hover {
    border-color: var(--rnd-accent);
    transform: translateY(-2px);
}

.rnd-project-card.active {
    border-color: var(--rnd-accent);
    background: rgba(201, 169, 98, 0.08);
}

.rnd-project-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
}

.rnd-project-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--rnd-text);
    margin: 0;
}

.rnd-project-version {
    font-size: 12px;
    color: var(--rnd-text-muted);
    background: var(--rnd-border);
    padding: 2px 8px;
    border-radius: 4px;
}

.rnd-project-description {
    font-size: 13px;
    color: var(--rnd-text-secondary);
    margin: 0 0 12px 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.rnd-project-agenda {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    margin: 8px 0;
    background: linear-gradient(135deg, rgba(74, 144, 164, 0.1) 0%, rgba(53, 122, 138, 0.05) 100%);
    border-left: 3px solid #4a90a4;
    border-radius: 0 8px 8px 0;
}

.rnd-project-agenda-icon {
    font-size: 14px;
}

.rnd-project-agenda-date {
    font-size: 12px;
    font-weight: 600;
    color: #4a90a4;
    white-space: nowrap;
}

.rnd-project-agenda-desc {
    font-size: 11px;
    color: var(--rnd-text-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
}

.rnd-project-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.rnd-project-date {
    font-size: 12px;
    color: var(--rnd-text-muted);
}

/* ============================================
   9. BADGES STATUT
   ============================================ */
.rnd-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.rnd-status-badge.idea {
    background: rgba(139, 127, 219, 0.15);
    color: var(--rnd-status-idea);
}

.rnd-status-badge.test {
    background: rgba(230, 167, 86, 0.15);
    color: var(--rnd-status-test);
}

.rnd-status-badge.valid {
    background: rgba(95, 186, 125, 0.15);
    color: var(--rnd-status-valid);
}

.rnd-status-badge.menu {
    background: rgba(201, 169, 98, 0.15);
    color: var(--rnd-status-menu);
}

/* ============================================
   10. VUE DÉTAIL PROJET
   ============================================ */
.rnd-detail-content {
    max-width: 600px;
    margin: 0 auto;
}

/* Photo du plat */
.rnd-detail-photo {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: var(--rnd-bg-card);
    border: 3px solid var(--rnd-border);
    margin: 0 auto 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.rnd-detail-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.rnd-detail-photo-placeholder {
    font-size: 48px;
    color: var(--rnd-text-muted);
}

/* Header détail */
.rnd-detail-header {
    text-align: center;
    margin-bottom: 32px;
}

.rnd-detail-header .rnd-status-badge {
    margin-bottom: 12px;
}

.rnd-detail-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--rnd-text);
    margin: 0 0 8px 0;
}

.rnd-detail-version {
    font-size: 14px;
    color: var(--rnd-text-muted);
}

.rnd-detail-description {
    font-size: 15px;
    color: var(--rnd-text-secondary);
    line-height: 1.6;
    margin: 16px 0;
    text-align: center;
}

/* Tags */
.rnd-detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin: 16px 0;
}

.rnd-tag {
    background: var(--rnd-bg-card);
    border: 1px solid var(--rnd-border);
    border-radius: 16px;
    padding: 6px 14px;
    font-size: 12px;
    color: var(--rnd-text-secondary);
}

/* Méta infos */
.rnd-detail-meta {
    display: flex;
    justify-content: center;
    gap: 24px;
    padding: 16px 0;
    border-top: 1px solid var(--rnd-border);
    border-bottom: 1px solid var(--rnd-border);
    margin: 24px 0;
}

.rnd-detail-meta-item {
    text-align: center;
}

.rnd-detail-meta-label {
    font-size: 11px;
    color: var(--rnd-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.rnd-detail-meta-value {
    font-size: 14px;
    color: var(--rnd-text);
    font-weight: 500;
}

/* ============================================
   11. ÉVALUATION SENSORIELLE - SCORES CIRCULAIRES
   ============================================ */
.rnd-evaluation {
    margin: 32px 0;
}

.rnd-evaluation-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--rnd-text);
    margin-bottom: 20px;
    text-align: center;
}

.rnd-scores-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.rnd-score-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.rnd-score-circle {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: var(--rnd-bg-card);
    border: 3px solid var(--rnd-border);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    margin-bottom: 8px;
}

.rnd-score-circle::before {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    border-radius: 50%;
    border: 3px solid transparent;
    border-top-color: var(--rnd-accent);
    transform: rotate(var(--rotation, 0deg));
}

.rnd-score-value {
    font-size: 20px;
    font-weight: 700;
    color: var(--rnd-accent);
}

.rnd-score-label {
    font-size: 11px;
    color: var(--rnd-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Variantes de couleur selon le score */
.rnd-score-circle.high {
    border-color: var(--rnd-status-valid);
}

.rnd-score-circle.high .rnd-score-value {
    color: var(--rnd-status-valid);
}

.rnd-score-circle.medium {
    border-color: var(--rnd-status-test);
}

.rnd-score-circle.medium .rnd-score-value {
    color: var(--rnd-status-test);
}

.rnd-score-circle.low {
    border-color: var(--rnd-status-idea);
}

.rnd-score-circle.low .rnd-score-value {
    color: var(--rnd-status-idea);
}

/* ============================================
   12. NOTES & OBSERVATIONS
   ============================================ */
.rnd-notes-section {
    margin: 32px 0;
}

.rnd-notes-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--rnd-text);
    margin-bottom: 16px;
}

.rnd-notes-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.rnd-note-item {
    background: var(--rnd-bg-card);
    border: 1px solid var(--rnd-border);
    border-radius: 10px;
    padding: 14px;
}

.rnd-note-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

.rnd-note-author {
    font-size: 13px;
    font-weight: 500;
    color: var(--rnd-accent);
}

.rnd-note-date {
    font-size: 12px;
    color: var(--rnd-text-muted);
}

.rnd-note-text {
    font-size: 14px;
    color: var(--rnd-text-secondary);
    line-height: 1.5;
}

/* Ajout de note */
.rnd-add-note {
    margin-top: 16px;
}

.rnd-add-note textarea {
    width: 100%;
    background: var(--rnd-bg-card);
    border: 1px solid var(--rnd-border);
    border-radius: 10px;
    padding: 12px;
    font-size: 14px;
    color: var(--rnd-text);
    resize: none;
    outline: none;
    font-family: inherit;
}

.rnd-add-note textarea::placeholder {
    color: var(--rnd-text-muted);
}

.rnd-add-note textarea:focus {
    border-color: var(--rnd-accent);
}

.rnd-add-note-btn {
    margin-top: 8px;
    background: var(--rnd-accent);
    border: none;
    border-radius: 8px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    color: #000;
    cursor: pointer;
    transition: background 0.2s ease;
}

.rnd-add-note-btn:hover {
    background: var(--rnd-accent-hover);
}

/* ============================================
   13. BOUTONS D'ACTION
   ============================================ */
.rnd-actions {
    display: flex;
    gap: 12px;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--rnd-border);
}

.rnd-action-btn {
    flex: 1;
    padding: 14px 20px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.rnd-action-btn.secondary {
    background: var(--rnd-bg-card);
    border: 1px solid var(--rnd-border);
    color: var(--rnd-text);
}

.rnd-action-btn.secondary:hover {
    border-color: var(--rnd-text-muted);
}

.rnd-action-btn.primary {
    background: var(--rnd-accent);
    border: none;
    color: #000;
}

.rnd-action-btn.primary:hover {
    background: var(--rnd-accent-hover);
}

.rnd-action-btn.success {
    background: var(--rnd-status-valid);
    border: none;
    color: #fff;
}

.rnd-action-btn.success:hover {
    background: #4ea86c;
}

/* ============================================
   14. FAB - BOUTON FLOTTANT (Mobile)
   ============================================ */
.rnd-fab {
    display: none;
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--rnd-accent);
    border: none;
    color: #000;
    font-size: 28px;
    font-weight: 300;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(201, 169, 98, 0.4);
    transition: all 0.2s ease;
    z-index: 100;
}

.rnd-fab:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 24px rgba(201, 169, 98, 0.5);
}

/* ============================================
   15. MODAL CRÉATION/ÉDITION PROJET
   ============================================ */
.rnd-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.rnd-modal-overlay.active {
    display: flex;
}

.rnd-modal {
    background: var(--rnd-bg);
    border: 1px solid var(--rnd-border);
    border-radius: 16px;
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
}

.rnd-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid var(--rnd-border);
}

.rnd-modal-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--rnd-text);
    margin: 0;
}

.rnd-modal-close {
    background: transparent;
    border: none;
    color: var(--rnd-text-muted);
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.rnd-modal-close:hover {
    color: var(--rnd-text);
}

.rnd-modal-body {
    padding: 20px;
}

.rnd-form-group {
    margin-bottom: 20px;
}

.rnd-form-label {
    display: block;
    font-size: 13px;
    color: var(--rnd-text-muted);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.rnd-form-input,
.rnd-form-select,
.rnd-form-textarea {
    width: 100%;
    background: var(--rnd-bg-card);
    border: 1px solid var(--rnd-border);
    border-radius: 8px;
    padding: 12px;
    font-size: 15px;
    color: var(--rnd-text);
    outline: none;
    font-family: inherit;
}

.rnd-form-input:focus,
.rnd-form-select:focus,
.rnd-form-textarea:focus {
    border-color: var(--rnd-accent);
}

.rnd-form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23888'%3E%3Cpath d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

.rnd-form-textarea {
    resize: vertical;
    min-height: 100px;
}

.rnd-modal-footer {
    display: flex;
    gap: 12px;
    padding: 20px;
    border-top: 1px solid var(--rnd-border);
}

/* ============================================
   16. VUE TIMELINE (placeholder)
   ============================================ */
.rnd-timeline-view {
    padding: 24px;
}

.rnd-timeline-empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--rnd-text-muted);
}

.rnd-timeline-empty-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

/* ============================================
   17. VUE NODES (placeholder)
   ============================================ */
.rnd-nodes-view {
    padding: 24px;
}

.rnd-nodes-empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--rnd-text-muted);
}

.rnd-nodes-empty-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

/* ============================================
   18. SCROLLBAR CUSTOM
   ============================================ */
#rnd-module ::-webkit-scrollbar {
    width: 6px;
}

#rnd-module ::-webkit-scrollbar-track {
    background: var(--rnd-bg);
}

#rnd-module ::-webkit-scrollbar-thumb {
    background: var(--rnd-border);
    border-radius: 3px;
}

#rnd-module ::-webkit-scrollbar-thumb:hover {
    background: var(--rnd-text-muted);
}

/* ============================================
   19. RESPONSIVE - MOBILE (<768px)
   ============================================ */
@media (max-width: 768px) {
    /* Layout mobile : pas de sidebar */
    .rnd-content {
        flex-direction: column;
        height: auto;
    }

    .rnd-sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--rnd-border);
    }

    /* Cache sidebar quand détail est affiché */
    .rnd-content.show-detail .rnd-sidebar {
        display: none;
    }

    .rnd-content.show-detail .rnd-detail {
        display: block;
    }

    /* Cache détail par défaut sur mobile */
    .rnd-detail {
        display: none;
        padding: 16px;
    }

    /* Bouton retour visible sur mobile dans détail */
    .rnd-detail-back {
        display: flex;
        align-items: center;
        gap: 8px;
        background: transparent;
        border: none;
        color: var(--rnd-accent);
        font-size: 14px;
        padding: 0;
        margin-bottom: 20px;
        cursor: pointer;
    }

    .rnd-detail-back::before {
        content: '←';
    }

    /* FAB visible sur mobile */
    .rnd-fab {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    /* Ajustements header */
    .rnd-header {
        padding: 16px;
    }

    .rnd-header h1 {
        font-size: 22px;
    }

    /* Scores en 2x2 sur petit écran */
    .rnd-scores-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .rnd-score-circle {
        width: 80px;
        height: 80px;
    }

    /* Actions en colonne */
    .rnd-actions {
        flex-direction: column;
    }

    /* Modal plein écran mobile */
    .rnd-modal {
        max-width: 100%;
        max-height: 100%;
        border-radius: 0;
    }

    /* Onglets scrollables */
    .rnd-tabs {
        overflow-x: auto;
        justify-content: flex-start;
        padding: 12px 16px;
    }

    .rnd-tab-btn {
        padding: 10px 20px;
        white-space: nowrap;
    }

    /* Photo plus petite */
    .rnd-detail-photo {
        width: 140px;
        height: 140px;
    }

    /* Titre plus petit */
    .rnd-detail-title {
        font-size: 22px;
    }

    /* Meta en colonne */
    .rnd-detail-meta {
        flex-direction: column;
        gap: 16px;
    }
}

/* ============================================
   20. RESPONSIVE - TABLETTE (768px - 1024px)
   ============================================ */
@media (min-width: 769px) and (max-width: 1024px) {
    .rnd-sidebar {
        width: 280px;
    }

    .rnd-scores-grid {
        gap: 12px;
    }

    .rnd-score-circle {
        width: 60px;
        height: 60px;
    }

    .rnd-score-value {
        font-size: 18px;
    }
}

/* ============================================
   21. ANIMATIONS
   ============================================ */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.rnd-project-card {
    animation: fadeIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.rnd-detail-content {
    animation: slideIn 0.3s ease;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.rnd-fab:active {
    animation: pulse 0.2s ease;
}

/* ============================================
   22. ÉTATS VIDES ET LOADING
   ============================================ */

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.rnd-empty-state {
    text-align: center;
    padding: 60px 20px;
}

.rnd-empty-icon {
    font-size: 64px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.rnd-empty-title {
    font-size: 18px;
    color: var(--rnd-text);
    margin: 0 0 8px 0;
}

.rnd-empty-text {
    font-size: 14px;
    color: var(--rnd-text-muted);
    margin: 0;
}

/* ============================================
   23. DESKTOP - Bouton retour caché
   ============================================ */
@media (min-width: 769px) {
    .rnd-detail-back {
        display: none;
    }

    /* Toujours montrer la sidebar et le détail */
    .rnd-content.show-detail .rnd-sidebar {
        display: block;
    }

    .rnd-detail {
        display: block;
    }
}

/* ============================================
   24. ÉDITEUR DE NODES - CONTAINER
   ============================================ */
.nodes-editor {
    position: relative;
    width: 100%;
    height: calc(100vh - 180px);
    background: var(--rnd-bg);
    overflow: hidden;
}

.rnd-nodes-view {
    padding: 0 !important;
}

/* ============================================
   25. ÉDITEUR DE NODES - TOOLBAR
   ============================================ */
.nodes-toolbar {
    position: absolute;
    top: 16px;
    left: 16px;
    display: flex;
    align-items: center;
    gap: 4px;
    background: var(--rnd-bg-card);
    border: 1px solid var(--rnd-border);
    border-radius: 10px;
    padding: 6px;
    z-index: 100;
}

.nodes-toolbar-btn {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: transparent;
    border: none;
    color: var(--rnd-text-muted);
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.nodes-toolbar-btn:hover {
    background: var(--rnd-border);
    color: var(--rnd-text);
}

.nodes-toolbar-btn:active {
    transform: scale(0.95);
}

#nodes-add-btn {
    background: var(--rnd-accent);
    color: #000;
    font-weight: 600;
}

#nodes-add-btn:hover {
    background: var(--rnd-accent-hover);
}

.nodes-toolbar-separator {
    width: 1px;
    height: 24px;
    background: var(--rnd-border);
    margin: 0 4px;
}

.nodes-zoom-level {
    font-size: 12px;
    color: var(--rnd-text-muted);
    padding: 0 8px;
    min-width: 45px;
    text-align: center;
}

/* --- Toolbar toggle --- */
.nodes-toolbar-toggle {
    position: absolute;
    top: 50%;
    right: -14px;
    transform: translateY(-50%);
    width: 14px;
    height: 32px;
    background: var(--rnd-bg-card);
    border: 1px solid var(--rnd-border);
    border-left: none;
    border-radius: 0 6px 6px 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--rnd-text-muted);
    font-size: 10px;
    transition: color 0.2s;
    z-index: 101;
}

.nodes-toolbar-toggle:hover {
    color: var(--rnd-text);
}

.nodes-toolbar.collapsed {
    padding: 4px;
    gap: 0;
}

.nodes-toolbar.collapsed .nodes-toolbar-btn,
.nodes-toolbar.collapsed .nodes-toolbar-separator,
.nodes-toolbar.collapsed .nodes-zoom-level {
    display: none;
}

.nodes-toolbar.collapsed .nodes-toolbar-toggle {
    position: static;
    transform: none;
    width: 24px;
    height: 24px;
    border: none;
    border-radius: 6px;
    background: transparent;
}

/* --- Active tool state --- */
.nodes-toolbar-btn.tool-active {
    background: var(--rnd-accent);
    color: #000;
    box-shadow: 0 0 8px rgba(var(--rnd-accent-rgb, 255, 193, 7), 0.3);
}

.nodes-toolbar-btn.tool-active:hover {
    background: var(--rnd-accent-hover);
    color: #000;
}

/* Recalcul button spin animation */
#nodes-recalc-all span {
    display: inline-block;
    transition: transform 0.4s ease;
}
#nodes-recalc-all.spinning span {
    animation: recalc-spin 0.6s ease;
}
@keyframes recalc-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* --- Cut mode cursor on canvas --- */
.nodes-editor.tool-cut .connection-line {
    cursor: crosshair;
    stroke-opacity: 0.6;
}

.nodes-editor.tool-cut .connection-line:hover {
    stroke: #ff4444;
    stroke-width: 5;
    stroke-opacity: 1;
}

.nodes-editor.tool-cut {
    cursor: crosshair;
}

/* ============================================
   26. ÉDITEUR DE NODES - CANVAS SVG
   ============================================ */
.nodes-canvas {
    width: 100%;
    height: 100%;
    cursor: default;
    user-select: none;
    touch-action: none; /* Désactive les gestes natifs du navigateur */
}

.nodes-grid {
    pointer-events: all;
}

/* ============================================
   27. ÉDITEUR DE NODES - CONNEXIONS
   ============================================ */
.connection-line {
    fill: none;
    stroke: var(--rnd-accent);
    stroke-width: 2;
    stroke-opacity: 0.8;
    cursor: pointer;
    transition: stroke-width 0.2s ease, stroke-opacity 0.2s ease;
}

.connection-line:hover {
    stroke-width: 4;
    stroke-opacity: 1;
}

/* Connexion ingrédient → recette (vert) */
.connection-ingredient-steps {
    stroke: #5fba7d;
    stroke-width: 3;
}

.connection-ingredient-steps:hover {
    stroke-width: 5;
}

/* Connexion ingrédient → texture (cyan) */
.connection-ingredient-texture {
    stroke: #00c7be;
    stroke-width: 3;
}

.connection-ingredient-texture:hover {
    stroke-width: 5;
}

.pending-connection {
    fill: none;
    stroke: var(--rnd-accent);
    stroke-width: 2;
    stroke-dasharray: 8, 4;
    stroke-opacity: 0.6;
    pointer-events: none;
    animation: dash-flow 0.5s linear infinite;
}

@keyframes dash-flow {
    to {
        stroke-dashoffset: -12;
    }
}

/* ============================================
   28. ÉDITEUR DE NODES - NODE ELEMENT
   ============================================ */
.node-foreign-object {
    overflow: visible;
}

.node-element {
    background: var(--rnd-bg-card);
    border: 1px solid var(--rnd-border);
    border-radius: 12px;
    min-width: 180px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    position: relative;
    overflow: visible;
}

/* Top accent line */
.node-element::before {
    content: '';
    position: absolute;
    top: 0;
    left: 15%;
    right: 15%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--node-color, var(--rnd-accent)), transparent);
    opacity: 0.5;
    border-radius: 12px 12px 0 0;
}

.node-element:hover {
    border-color: var(--node-color, var(--rnd-accent));
}

.node-element.selected {
    border-color: var(--rnd-accent);
    box-shadow: 0 0 0 2px var(--rnd-accent), 0 8px 30px rgba(201, 169, 98, 0.3);
}

.node-element.dragging {
    opacity: 0.9;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

/* Mode resize (pinch) */
.node-element.resizing {
    border-color: #5fba7d;
    box-shadow: 0 0 0 3px #5fba7d, 0 8px 30px rgba(95, 186, 125, 0.4);
    transition: none; /* Pas de transition pendant le resize pour être fluide */
}

.node-element.resizing::after {
    content: '↔';
    position: absolute;
    top: -25px;
    left: 50%;
    transform: translateX(-50%);
    background: #5fba7d;
    color: white;
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: bold;
}

/* Mode édition (double-click) */
.node-element:not(.editing) .node-content {
    opacity: 0.85;
}

/* Désactiver uniquement les inputs/selects/boutons +- quand pas en mode édition */
.node-element:not(.editing) .node-field-input,
.node-element:not(.editing) .node-field-select,
.node-element:not(.editing) .node-field-btn {
    pointer-events: none;
    opacity: 0.6;
}

/* Mais garder les boutons d'action cliquables (sélecteurs, canvas, etc.) */
.node-element:not(.editing) .node-field-btn-selector,
.node-element:not(.editing) .node-field-btn-audio,
.node-element:not(.editing) .node-canvas-preview,
.node-element:not(.editing) .node-sketch-preview,
.node-element:not(.editing) .node-image-preview,
.node-element:not(.editing) .node-field-textarea-preview {
    pointer-events: auto;
    opacity: 1;
    cursor: pointer;
}

.node-element.editing {
    border-color: var(--rnd-accent);
    box-shadow: 0 0 0 2px var(--rnd-accent), 0 8px 30px rgba(201, 169, 98, 0.4);
}

.node-element.editing .node-content {
    opacity: 1;
}

.node-element.editing .node-field-input,
.node-element.editing .node-field-select,
.node-element.editing .node-field-btn {
    opacity: 1;
}

/* Indicateur de sauvegarde */
.node-save-indicator {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--rnd-emerald);
    opacity: 0.6;
    z-index: 10;
}

.node-save-indicator.saving {
    opacity: 1;
    transform: scale(1);
    background: var(--rnd-accent);
    animation: pulse-save 0.6s ease infinite;
}

.node-save-indicator.saved {
    opacity: 1;
    transform: scale(1);
    background: #5fba7d;
    animation: none;
}

@keyframes pulse-save {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.3); opacity: 0.7; }
}

/* Hint pour double-click */
.node-edit-hint {
    text-align: center;
    padding: 6px 10px 10px;
    font-size: 8px;
    color: var(--rnd-text-muted);
    letter-spacing: 0.06em;
    opacity: 0.6;
}

/* Node Header */
.node-header {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 12px 12px 0 0;
    cursor: move;
    user-select: none;
    background: linear-gradient(135deg,
        rgba(201, 169, 98, 0.12) 0%,
        rgba(201, 169, 98, 0.04) 100%
    );
    border-bottom: 1px solid var(--rnd-border);
}

.node-icon {
    font-size: 14px;
}

.node-title {
    flex: 1;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.06em;
    color: var(--rnd-gold-soft);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Bouton supprimer node */
.node-delete-btn {
    margin-left: auto;
    background: none;
    border: none;
    color: var(--rnd-text-muted);
    font-size: 14px;
    cursor: pointer;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s ease;
    line-height: 1;
}

.node-delete-btn:hover {
    background: rgba(255, 255, 255, 0.06);
    color: var(--rnd-text-dim);
}

.node-delete-btn:active {
    transform: scale(0.9);
}

/* Node Ports */
.node-port {
    position: absolute;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--rnd-bg-card);
    border: 2px solid var(--rnd-text-muted);
    cursor: crosshair;
    transition: all 0.2s ease;
    z-index: 10;
}

.node-port:hover {
    border-color: var(--rnd-gold);
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.3);
}

.node-port.connecting {
    border-color: var(--rnd-accent);
    background: var(--rnd-accent);
    animation: port-pulse 0.8s ease infinite;
}

@keyframes port-pulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(201, 169, 98, 0.5);
    }
    50% {
        box-shadow: 0 0 0 8px rgba(201, 169, 98, 0);
    }
}

.node-port-input {
    left: -5px;
    top: 50%;
    transform: translateY(-50%);
}

.node-port-output {
    right: -5px;
    top: 50%;
    transform: translateY(-50%);
}

.node-port-top {
    top: -5px;
    left: 50%;
    transform: translateX(-50%);
}

.node-port-bottom {
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
}

/* Node Content */
.node-content {
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* ============================================
   28b. ÉTAT COMPACT DES NODES
   ============================================ */

/* État rempli (ingrédient choisi) */
.node-element.filled .node-header {
    background: linear-gradient(135deg,
        rgba(201, 169, 98, 0.18) 0%,
        rgba(201, 169, 98, 0.06) 100%
    );
}

/* État compact : masquer le contenu normal, afficher le résumé */
.node-element.compact .node-content {
    display: none;
}

.node-element:not(.compact) .node-compact-body {
    display: none;
}

/* Corps compact */
.node-compact-body {
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.node-compact-main {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
}

.node-compact-name {
    font-size: 13px;
    font-weight: 500;
    color: var(--rnd-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.node-compact-qty {
    font-family: 'JetBrains Mono', monospace;
    font-size: 14px;
    font-weight: 600;
    color: var(--rnd-gold);
    flex-shrink: 0;
}

.node-compact-unit {
    font-size: 10px;
    font-weight: 400;
    color: var(--rnd-text-muted);
    margin-left: 1px;
}

.node-compact-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.node-compact-tag {
    font-size: 9px;
    font-weight: 500;
    padding: 3px 7px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--rnd-border);
    color: var(--rnd-text-dim);
    letter-spacing: 0.02em;
}

/* ============================================
   29. ÉDITEUR DE NODES - CHAMPS
   ============================================ */
.node-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.node-field-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 8px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--rnd-text-muted);
}

.node-field-input {
    width: 100%;
    background: var(--rnd-bg-input);
    border: 1px solid var(--rnd-border);
    border-radius: 6px;
    padding: 7px 10px;
    font-size: 11px;
    color: var(--rnd-text);
    font-family: 'Outfit', sans-serif;
    outline: none;
    transition: all 0.2s ease;
}

.node-field-input:focus {
    border-color: var(--rnd-gold-dim);
    background: rgba(212, 175, 55, 0.05);
}

.node-field-input::placeholder {
    color: var(--rnd-text-placeholder);
}

/* Number field - Design compact */
.node-field-number {
    display: flex;
    align-items: stretch;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid var(--rnd-border);
}

.node-field-number .node-field-input {
    flex: 1;
    text-align: center;
    padding: 7px 0;
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    font-weight: 500;
    border: none;
    border-left: 1px solid var(--rnd-border);
    border-right: 1px solid var(--rnd-border);
    border-radius: 0;
    -moz-appearance: textfield;
}

.node-field-number .node-field-input::-webkit-outer-spin-button,
.node-field-number .node-field-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.node-field-btn {
    width: 30px;
    background: var(--rnd-bg-field);
    border: none;
    color: var(--rnd-text-muted);
    font-size: 13px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
}

.node-field-btn:hover {
    background: rgba(255, 255, 255, 0.06);
    color: var(--rnd-text);
}

.node-field-btn:active {
    background: rgba(255, 255, 255, 0.1);
}

/* Select field */
.node-field-select {
    width: 100%;
    background: var(--rnd-bg-input);
    border: 1px solid var(--rnd-border);
    border-radius: 6px;
    padding: 7px 28px 7px 10px;
    font-size: 11px;
    color: var(--rnd-text);
    font-family: 'Outfit', sans-serif;
    outline: none;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' fill='%23555b69'%3E%3Cpath d='M0 0l5 6 5-6z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    transition: all 0.2s ease;
}

.node-field-select:hover {
    border-color: var(--rnd-border-hover);
}

.node-field-select:focus {
    border-color: var(--rnd-gold-dim);
}

/* Textarea preview */
.node-field-textarea-preview {
    background: var(--rnd-bg);
    border: 1px solid var(--rnd-border);
    border-radius: 6px;
    padding: 8px 10px;
    font-size: 12px;
    color: var(--rnd-text-muted);
    cursor: pointer;
    min-height: 40px;
    transition: border-color 0.2s ease;
    line-height: 1.4;
}

.node-field-textarea-preview:hover {
    border-color: var(--rnd-accent);
    color: var(--rnd-text-secondary);
}

/* Score field */
.node-field-score {
    display: flex;
    align-items: center;
    gap: 10px;
}

.node-field-slider {
    flex: 1;
    height: 6px;
    border-radius: 3px;
    background: var(--rnd-border);
    appearance: none;
    cursor: pointer;
}

.node-field-slider::-webkit-slider-thumb {
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--rnd-accent);
    cursor: pointer;
    transition: transform 0.2s ease;
}

.node-field-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

.node-field-slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--rnd-accent);
    border: none;
    cursor: pointer;
}

.node-field-score-value {
    font-size: 12px;
    color: var(--rnd-accent);
    font-weight: 600;
    min-width: 45px;
    text-align: right;
}

/* Button selectors */
.node-field-btn-selector,
.node-field-btn-audio {
    width: 100%;
    background: var(--rnd-bg-input);
    border: 1px solid var(--rnd-border);
    border-radius: 6px;
    padding: 7px 10px;
    font-size: 11px;
    color: var(--rnd-text);
    font-family: 'Outfit', sans-serif;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
}

.node-field-btn-selector .selector-value {
    color: var(--rnd-text-placeholder);
}

.node-field-btn-selector.has-value .selector-value {
    color: var(--rnd-text);
}

.node-field-btn-selector:hover:not(:disabled),
.node-field-btn-audio:hover:not(:disabled) {
    border-color: var(--rnd-border-hover);
}

.node-field-btn-selector.has-value {
    border-color: var(--rnd-gold-dim);
}

.node-field-btn-selector:disabled,
.node-field-btn-selector.disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* Badge affichant les usages connectés sur un ingrédient */
.node-field-btn-selector.ingredient-selector {
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: center;
}

.selector-usage-badge {
    display: inline-block;
    background: linear-gradient(135deg, var(--rnd-accent) 0%, #b89545 100%);
    color: #1a1a2e;
    font-size: 10px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 10px;
    margin-top: 2px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ============================================
   AGENDA FIELD
   ============================================ */
.node-field-agenda {
    padding: 8px;
}

.node-field-btn-agenda {
    width: 100%;
    background: linear-gradient(135deg, #4a90a4 0%, #357a8a 100%);
    border: none;
    border-radius: 8px;
    padding: 12px;
    font-size: 13px;
    color: white;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    font-weight: 500;
}

.node-field-btn-agenda:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(74, 144, 164, 0.4);
}

.node-agenda-display {
    background: var(--rnd-bg);
    border: 1px solid var(--rnd-border);
    border-radius: 8px;
    padding: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.node-agenda-display:hover {
    border-color: var(--rnd-accent);
    background: rgba(201, 169, 98, 0.05);
}

.node-agenda-date {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.node-agenda-icon {
    font-size: 16px;
}

.node-agenda-date-text {
    font-size: 13px;
    font-weight: 600;
    color: #4a90a4;
}

.node-agenda-description {
    font-size: 12px;
    color: var(--rnd-text-muted);
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* Agenda Modal */
.agenda-modal {
    max-width: 400px;
}

.agenda-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.agenda-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.agenda-field label {
    font-size: 12px;
    font-weight: 600;
    color: var(--rnd-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.agenda-input {
    padding: 10px 12px;
    background: var(--rnd-bg);
    border: 1px solid var(--rnd-border);
    border-radius: 8px;
    font-size: 14px;
    color: var(--rnd-text);
    transition: border-color 0.2s ease;
}

.agenda-input:focus {
    outline: none;
    border-color: var(--rnd-accent);
}

.agenda-textarea {
    padding: 10px 12px;
    background: var(--rnd-bg);
    border: 1px solid var(--rnd-border);
    border-radius: 8px;
    font-size: 14px;
    color: var(--rnd-text);
    resize: vertical;
    min-height: 80px;
    font-family: inherit;
    transition: border-color 0.2s ease;
}

.agenda-textarea:focus {
    outline: none;
    border-color: var(--rnd-accent);
}

.nodes-modal-btn.danger {
    background: #e05c5c;
    color: white;
    margin-right: auto;
}

.nodes-modal-btn.danger:hover {
    background: #c94a4a;
}

/* Canvas preview */
.node-field-canvas {
    padding: 0;
}

.node-canvas-preview {
    background: var(--rnd-bg);
    border: 1px solid var(--rnd-border);
    border-radius: 6px;
    height: 120px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: border-color 0.2s ease;
}

.node-canvas-preview:hover {
    border-color: var(--rnd-accent);
}

.node-canvas-icon {
    font-size: 32px;
}

.node-canvas-preview span:last-child {
    font-size: 12px;
    color: var(--rnd-text-muted);
}

/* Image preview */
.node-field-image {
    padding: 0;
}

.node-image-preview {
    background: var(--rnd-bg);
    border: 1px solid var(--rnd-border);
    border-radius: 6px;
    height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    overflow: hidden;
    transition: border-color 0.2s ease;
}

.node-image-preview:hover {
    border-color: var(--rnd-accent);
}

.node-image-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.node-image-icon {
    font-size: 40px;
    color: var(--rnd-text-muted);
}

/* ============================================
   30. ÉDITEUR DE NODES - MENU AJOUT
   ============================================ */
.nodes-add-menu {
    position: absolute;
    top: 70px;
    left: 16px;
    width: 220px;
    background: var(--rnd-bg-card);
    border: 1px solid var(--rnd-border);
    border-radius: 12px;
    z-index: 200;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.nodes-add-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nodes-add-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 14px;
    border-bottom: 1px solid var(--rnd-border);
}

.nodes-add-menu-header span {
    font-size: 13px;
    font-weight: 600;
    color: var(--rnd-text);
}

.nodes-add-menu-close {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    background: transparent;
    border: none;
    color: var(--rnd-text-muted);
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nodes-add-menu-close:hover {
    background: var(--rnd-border);
    color: var(--rnd-text);
}

.nodes-add-menu-list {
    padding: 8px;
    max-height: 300px;
    overflow-y: auto;
}

.nodes-add-menu-item {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: transparent;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.nodes-add-menu-item:hover {
    background: var(--rnd-border);
}

.nodes-add-menu-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.nodes-add-menu-name {
    font-size: 13px;
    color: var(--rnd-text);
}

/* ============================================
   31. ÉDITEUR DE NODES - MESSAGE VIDE
   ============================================ */
.nodes-empty-message {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    pointer-events: none;
}

.nodes-empty-icon {
    font-size: 64px;
    margin-bottom: 16px;
    opacity: 0.3;
}

.nodes-empty-message p {
    font-size: 16px;
    color: var(--rnd-text-muted);
    margin: 0 0 8px 0;
}

.nodes-empty-hint {
    font-size: 13px !important;
    color: var(--rnd-text-muted);
    opacity: 0.7;
}

.nodes-empty-hint strong {
    color: var(--rnd-accent);
}

/* ============================================
   32. ÉDITEUR DE NODES - MODAL
   ============================================ */
.nodes-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.nodes-modal {
    background: var(--rnd-bg);
    border: 1px solid var(--rnd-border);
    border-radius: 16px;
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.nodes-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--rnd-border);
}

.nodes-modal-header h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--rnd-text);
    margin: 0;
}

.nodes-modal-close {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    background: transparent;
    border: none;
    color: var(--rnd-text-muted);
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nodes-modal-close:hover {
    background: var(--rnd-border);
    color: var(--rnd-text);
}

.nodes-modal-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}

.nodes-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 16px 20px;
    border-top: 1px solid var(--rnd-border);
}

.nodes-modal-btn {
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.nodes-modal-btn.secondary {
    background: var(--rnd-bg-card);
    border: 1px solid var(--rnd-border);
    color: var(--rnd-text);
}

.nodes-modal-btn.secondary:hover {
    border-color: var(--rnd-text-muted);
}

.nodes-modal-btn.primary {
    background: var(--rnd-accent);
    border: none;
    color: #000;
}

.nodes-modal-btn.primary:hover {
    background: var(--rnd-accent-hover);
}

.modal-textarea {
    width: 100%;
    min-height: 200px;
    background: var(--rnd-bg-card);
    border: 1px solid var(--rnd-border);
    border-radius: 8px;
    padding: 12px;
    font-size: 14px;
    color: var(--rnd-text);
    resize: vertical;
    outline: none;
    font-family: inherit;
    line-height: 1.6;
}

.modal-textarea:focus {
    border-color: var(--rnd-accent);
}

/* ============================================
   SÉLECTEUR D'INGRÉDIENTS
   ============================================ */
.ingredient-selector-modal {
    max-width: 400px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
}

.ingredient-selector-modal .nodes-modal-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow: hidden;
}

.ingredient-search-container {
    padding: 0 0 12px 0;
    flex-shrink: 0;
}

.ingredient-search-input {
    width: 100%;
    padding: 12px 16px;
    background: var(--rnd-bg-card);
    border: 1px solid var(--rnd-border);
    border-radius: 8px;
    font-size: 15px;
    color: var(--rnd-text);
    outline: none;
    transition: border-color 0.2s ease;
}

.ingredient-search-input:focus {
    border-color: var(--rnd-accent);
}

.ingredient-search-input::placeholder {
    color: var(--rnd-text-muted);
}

.ingredient-list {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-height: 400px;
}

.ingredient-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    background: var(--rnd-bg-card);
    border: 1px solid var(--rnd-border);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s ease;
    text-align: left;
    width: 100%;
}

.ingredient-item:hover {
    border-color: var(--rnd-accent);
    background: rgba(201, 169, 98, 0.08);
}

.ingredient-item:active {
    transform: scale(0.98);
}

.ingredient-label {
    font-size: 14px;
    color: var(--rnd-text);
}

.ingredient-empty {
    padding: 32px 16px;
    text-align: center;
    color: var(--rnd-text-muted);
    font-size: 14px;
}

/* ============================================
   ENREGISTREUR AUDIO
   ============================================ */
.audio-recorder-modal {
    max-width: 360px;
}

.audio-recorder-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 24px 16px;
}

.audio-recorder-status {
    font-size: 14px;
    color: var(--rnd-text-secondary);
    margin-bottom: 20px;
    text-align: center;
}

.audio-recorder-btn {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--rnd-accent);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(201, 169, 98, 0.3);
}

.audio-recorder-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(201, 169, 98, 0.4);
}

.audio-recorder-btn:active {
    transform: scale(0.95);
}

.audio-recorder-btn.recording {
    background: #e74c3c;
    animation: pulse-recording 1.5s ease-in-out infinite;
}

@keyframes pulse-recording {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(231, 76, 60, 0.4);
    }
    50% {
        box-shadow: 0 0 0 15px rgba(231, 76, 60, 0);
    }
}

.audio-recorder-icon {
    font-size: 32px;
}

.audio-recorder-timer {
    font-size: 24px;
    font-weight: 600;
    color: var(--rnd-text);
    margin-top: 16px;
    font-variant-numeric: tabular-nums;
}

/* Player audio dans les nodes */
.node-audio-player {
    width: 100%;
    height: 36px;
    margin-bottom: 8px;
    border-radius: 6px;
}

.node-field-btn-rerecord {
    font-size: 11px;
    padding: 4px 8px;
    opacity: 0.7;
}

.node-field-btn-rerecord:hover {
    opacity: 1;
}

/* ============================================
   33. ÉDITEUR DE NODES - RESPONSIVE MOBILE
   ============================================ */
@media (max-width: 768px) {
    .nodes-editor {
        height: calc(100vh - 220px);
    }

    .nodes-toolbar {
        top: 12px;
        left: 12px;
        padding: 4px;
    }

    .nodes-toolbar-btn {
        width: 32px;
        height: 32px;
        font-size: 16px;
    }

    .nodes-zoom-level {
        display: none;
    }

    .nodes-add-menu {
        left: 12px;
        top: 60px;
        width: calc(100% - 24px);
        max-width: 280px;
    }

    .node-element {
        min-width: 160px;
    }

    .node-header {
        padding: 8px 10px;
    }

    .node-title {
        font-size: 12px;
    }

    .node-content {
        padding: 10px;
    }

    .node-field-label {
        font-size: 9px;
    }

    .node-field-input,
    .node-field-select {
        padding: 6px 8px;
        font-size: 12px;
    }

    .nodes-modal {
        max-width: 100%;
        max-height: 100%;
        border-radius: 0;
    }
}

/* ============================================
   SOUS-MENU PROJET
   ============================================ */
.rnd-project-item {
    margin-bottom: 8px;
}

.rnd-project-card.expanded {
    border-color: var(--rnd-accent);
    background: rgba(201, 169, 98, 0.08);
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    margin-bottom: 0;
}

.rnd-project-submenu {
    background: var(--rnd-bg-card);
    border: 1px solid var(--rnd-accent);
    border-top: none;
    border-radius: 0 0 12px 12px;
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    animation: submenuSlide 0.2s ease;
}

@keyframes submenuSlide {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.rnd-project-submenu-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 8px;
    color: var(--rnd-text-secondary);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
}

.rnd-project-submenu-btn:hover {
    background: rgba(201, 169, 98, 0.1);
    border-color: var(--rnd-border);
    color: var(--rnd-text);
}

.rnd-project-submenu-btn.active {
    background: rgba(201, 169, 98, 0.15);
    border-color: var(--rnd-accent);
    color: var(--rnd-accent);
}

.rnd-submenu-icon {
    font-size: 16px;
    width: 24px;
    text-align: center;
}

/* ============================================
   VUE PROJET (Header + contenu)
   ============================================ */
.rnd-view-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    background: var(--rnd-bg);
    border-bottom: 1px solid var(--rnd-border);
    position: sticky;
    top: 0;
    z-index: 10;
}

.rnd-back-btn {
    background: transparent;
    border: 1px solid var(--rnd-border);
    border-radius: 8px;
    padding: 8px 16px;
    color: var(--rnd-text-muted);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.rnd-back-btn:hover {
    border-color: var(--rnd-accent);
    color: var(--rnd-accent);
}

.rnd-view-header h2 {
    flex: 1;
    font-size: 18px;
    font-weight: 600;
    color: var(--rnd-text);
    margin: 0;
}

.rnd-view-badge {
    background: var(--rnd-accent);
    color: #000;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.rnd-view-badge.organoleptic {
    background: #8b7fdb;
    color: #fff;
}

.rnd-view-badge.sensory {
    background: #5fba7d;
    color: #fff;
}

/* Container pour les nodes dans la vue projet */
.rnd-nodes-container {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 280px);
}

.rnd-nodes-container .rnd-step-gauge {
    flex-shrink: 0;
}

.rnd-nodes-container #rnd-tab-nodes {
    flex: 1;
    overflow: hidden;
}

/* Mode vue projet - affichage plein écran du détail */
.rnd-content.show-project-view .rnd-sidebar {
    display: none;
}

.rnd-content.show-project-view .rnd-detail {
    display: block;
    padding: 0;
    height: 100%;
}

/* Mobile: vue projet */
@media (max-width: 768px) {
    .rnd-content.show-project-view {
        height: calc(100vh - 180px);
    }

    .rnd-content.show-project-view .rnd-detail {
        display: block;
        height: 100%;
    }

    .rnd-nodes-container {
        height: calc(100vh - 280px);
    }

    .rnd-view-header {
        flex-wrap: wrap;
        gap: 8px;
        padding: 12px 16px;
    }

    .rnd-view-header h2 {
        font-size: 16px;
        order: 2;
        width: 100%;
    }

    .rnd-back-btn {
        order: 1;
    }

    .rnd-view-badge {
        order: 3;
        margin-left: auto;
    }
}

/* Coming soon placeholder */
.rnd-coming-soon {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    min-height: 400px;
    text-align: center;
    color: var(--rnd-text-muted);
}

.rnd-coming-soon-icon {
    font-size: 64px;
    margin-bottom: 24px;
    opacity: 0.6;
}

.rnd-coming-soon h3 {
    font-size: 24px;
    color: var(--rnd-text);
    margin: 0 0 12px 0;
}

.rnd-coming-soon p {
    font-size: 14px;
    max-width: 400px;
    line-height: 1.5;
    margin: 0;
}

.rnd-coming-soon-status {
    margin-top: 24px !important;
    padding: 8px 16px;
    background: var(--rnd-border);
    border-radius: 20px;
    font-size: 12px;
    color: var(--rnd-text-muted);
}


/* ============================================
   TEXTURE NODES - Module calculateur
   Couleurs suggérées (admin peut personnaliser):
   - Texture Node: #8B5CF6 (violet)
   - Notes Process: #10B981 (vert)
   ============================================ */

/* Champs texture généraux */
.node-field-texture {
    margin-bottom: 10px;
}

.node-field-texture .node-field-unit {
    font-size: 11px;
    color: var(--rnd-text-muted);
    margin-left: 6px;
    white-space: nowrap;
}

.node-field-texture .node-field-number {
    display: flex;
    align-items: center;
}

.node-field-texture .node-field-number .node-field-input {
    flex: 1;
}

/* Champs conditionnels (affichage selon usage) */
.node-field-texture-conditional {
    display: none;
}

.node-field-texture-conditional.visible {
    display: block;
}

/* Checkbox custom pour texture */
.node-field-checkbox {
    display: flex;
    align-items: center;
}

.node-field-checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 12px;
    color: var(--rnd-text-secondary);
}

.node-field-checkbox-input {
    width: 16px;
    height: 16px;
    accent-color: var(--rnd-accent);
    cursor: pointer;
}

.node-field-checkbox-text {
    user-select: none;
}

/* Résultats texture */
.node-field-texture-results {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--rnd-border);
}


/* ============================================
   PROCESS NOTES - Node Notes Process
   ============================================ */

.node-field-process-notes {
    margin-top: 8px;
}

.process-notes {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.process-notes-empty {
    text-align: center;
    color: var(--rnd-text-muted);
    font-size: 11px;
    padding: 20px 12px;
    background: var(--rnd-bg);
    border-radius: 6px;
    border: 1px dashed var(--rnd-border);
}

.process-notes-title {
    font-size: 14px;
    font-weight: 700;
    color: #10B981;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--rnd-border);
}

/* Étapes du process */
.process-notes-steps {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.process-notes-step {
    display: flex;
    gap: 10px;
    padding: 8px;
    background: var(--rnd-bg);
    border-radius: 6px;
    border-left: 3px solid #10B981;
}

.process-notes-step-num {
    width: 20px;
    height: 20px;
    background: #10B981;
    color: #000;
    border-radius: 50%;
    font-size: 10px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.process-notes-step-text {
    font-size: 11px;
    color: var(--rnd-text-secondary);
    line-height: 1.4;
}

/* Points critiques */
.process-notes-critiques {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: 6px;
    padding: 10px;
}

.process-notes-critiques-title {
    font-size: 11px;
    font-weight: 700;
    color: #F59E0B;
    margin-bottom: 8px;
}

.process-notes-critique {
    font-size: 10px;
    color: var(--rnd-text-secondary);
    padding-left: 16px;
    margin-bottom: 4px;
    position: relative;
}

.process-notes-critique::before {
    content: '•';
    position: absolute;
    left: 4px;
    color: #F59E0B;
}

.process-notes-critique:last-child {
    margin-bottom: 0;
}

/* Meta infos process */
.process-notes-meta {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.process-notes-meta-item {
    text-align: center;
    padding: 8px;
    background: var(--rnd-bg);
    border-radius: 6px;
}

.process-notes-meta-label {
    display: block;
    font-size: 9px;
    color: var(--rnd-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.process-notes-meta-value {
    font-size: 12px;
    font-weight: 600;
    color: var(--rnd-text);
}

/* Texture cible (quenelle) */
.process-notes-texture-cible {
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 6px;
    padding: 10px;
}

.process-notes-texture-cible-title {
    font-size: 11px;
    font-weight: 700;
    color: #8B5CF6;
    margin-bottom: 6px;
}

.process-notes-texture-cible div {
    font-size: 10px;
    color: var(--rnd-text-secondary);
    margin-bottom: 2px;
}


/* ============================================
   INGREDIENTS TAB STYLES (R&D USER)
   ============================================ */

/* Header */
.rnd-ingredients-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.rnd-ingredients-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--rnd-text);
    margin: 0;
}

.rnd-new-ingredient-btn {
    background: var(--rnd-accent);
    color: #000;
    border: none;
    border-radius: 8px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.rnd-new-ingredient-btn:hover {
    background: var(--rnd-accent-hover);
}

/* Filters */
.rnd-ingredients-filters {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.rnd-ingredients-filters .rnd-search-wrapper {
    flex: 1;
    min-width: 200px;
}

.rnd-ingredients-filters .rnd-filters {
    display: flex;
    gap: 8px;
}

.rnd-filter-select {
    width: 160px;
    padding: 10px 12px;
    background: var(--rnd-bg-card);
    border: 1px solid var(--rnd-border);
    border-radius: 8px;
    color: var(--rnd-text);
    font-size: 13px;
    outline: none;
    cursor: pointer;
    transition: border-color 0.2s ease;
}

.rnd-filter-select:focus {
    border-color: var(--rnd-accent);
}

/* Grid */
.rnd-ingredients-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
}

/* Ingredient Card */
.rnd-ingredient-card {
    background: var(--rnd-bg-card);
    border: 1px solid var(--rnd-border);
    border-radius: 12px;
    padding: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.rnd-ingredient-card:hover {
    border-color: var(--rnd-accent);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.rnd-ingredient-card.status-not-reviewed {
    border-color: rgba(201, 169, 98, 0.5);
    box-shadow: 0 0 10px rgba(201, 169, 98, 0.15);
}

.rnd-ingredient-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.rnd-ingredient-icon {
    font-size: 24px;
}

.rnd-ingredient-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--rnd-text);
    margin: 0;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rnd-ingredient-meta {
    display: flex;
    gap: 8px;
    font-size: 11px;
    color: var(--rnd-text-muted);
    margin-bottom: 12px;
}

/* Mini radar in card */
.rnd-ingredient-radar-mini {
    width: 100%;
    height: 80px;
    display: flex;
    justify-content: center;
    margin-bottom: 12px;
}

.rnd-ingredient-radar-mini svg {
    width: 80px;
    height: 80px;
}

.rnd-ingredient-status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
}

.rnd-ingredient-status.active {
    color: #34c759;
}

.rnd-ingredient-status.not-reviewed {
    color: #c9a962;
    background: rgba(201, 169, 98, 0.15);
    padding: 4px 8px;
    border-radius: 4px;
}

.rnd-ingredient-status.archived {
    color: #8e8e93;
}

/* Nutrients USDA toggle section in card */
.rnd-nutrients-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 10px;
    margin-bottom: 8px;
    background: rgba(201, 169, 98, 0.08);
    border: 1px solid rgba(201, 169, 98, 0.2);
    border-radius: 6px;
    cursor: pointer;
    font-size: 11px;
    font-weight: 600;
    color: #c9a962;
    transition: background 0.2s;
    user-select: none;
}

.rnd-nutrients-toggle:hover {
    background: rgba(201, 169, 98, 0.15);
}

.rnd-toggle-arrow {
    font-size: 9px;
    transition: transform 0.2s;
}

.rnd-toggle-open .rnd-toggle-arrow {
    transform: rotate(90deg);
}

.rnd-nutrients-panel {
    display: none;
    margin-bottom: 10px;
    padding: 8px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 6px;
    max-height: 260px;
    overflow-y: auto;
}

.rnd-nutrients-panel.rnd-nutrients-expanded {
    display: block;
}

.rnd-nutrient-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 3px 6px;
    font-size: 11px;
    color: #999;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.rnd-nutrient-row:last-child {
    border-bottom: none;
}

.rnd-nutrient-row.rnd-nutrient-highlight {
    color: #e0e0e0;
    font-weight: 600;
    background: rgba(201, 169, 98, 0.06);
    border-radius: 4px;
}

.rnd-nutrient-label {
    flex: 1;
}

.rnd-nutrient-value {
    font-variant-numeric: tabular-nums;
    text-align: right;
    min-width: 60px;
}

/* Stats footer */
.rnd-ingredients-stats {
    margin-top: 20px;
    padding: 12px 16px;
    background: var(--rnd-bg-card);
    border-radius: 8px;
    font-size: 13px;
    color: var(--rnd-text-muted);
    text-align: center;
}

/* Empty state */
.rnd-ingredients-empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--rnd-text-muted);
}

.rnd-empty-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

/* ============================================
   INGREDIENT MODAL STYLES (R&D USER)
   ============================================ */

.rnd-ingredient-modal-body {
    max-height: calc(90vh - 140px);
    overflow-y: auto;
}


/* Form groups */
.rnd-form-group {
    margin-bottom: 16px;
}

.rnd-form-label {
    display: block;
    font-size: 12px;
    color: var(--rnd-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.rnd-form-input,
.rnd-form-select,
.rnd-form-textarea {
    width: 100%;
    background: var(--rnd-bg-card);
    border: 1px solid var(--rnd-border);
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 14px;
    color: var(--rnd-text);
    outline: none;
    transition: border-color 0.2s ease;
}

.rnd-form-input:focus,
.rnd-form-select:focus,
.rnd-form-textarea:focus {
    border-color: var(--rnd-accent);
}

.rnd-form-input::placeholder,
.rnd-form-textarea::placeholder {
    color: var(--rnd-text-muted);
}

.rnd-form-textarea {
    resize: vertical;
    min-height: 80px;
    font-family: inherit;
}

.rnd-form-select {
    cursor: pointer;
}

/* Sensory section */
.rnd-sensory-section h4,
.rnd-usages-section h4,
.rnd-roles-section h4 {
    font-size: 14px;
    font-weight: 600;
    color: var(--rnd-text);
    margin: 16px 0 12px 0;
    padding-top: 16px;
    border-top: 1px solid var(--rnd-border);
}

.rnd-sensory-sliders-and-radar {
    display: flex;
    gap: 24px;
    align-items: flex-start;
}

.rnd-sensory-sliders {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.rnd-slider-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.rnd-slider-row label {
    width: 110px;
    font-size: 13px;
    color: var(--rnd-text-secondary);
}

.rnd-slider-row input[type="range"] {
    flex: 1;
    height: 6px;
    background: var(--rnd-border);
    border-radius: 3px;
    appearance: none;
    outline: none;
    cursor: pointer;
}

.rnd-slider-row input[type="range"]::-webkit-slider-thumb {
    appearance: none;
    width: 16px;
    height: 16px;
    background: var(--rnd-accent);
    border-radius: 50%;
    cursor: pointer;
}

.rnd-slider-row input[type="range"]::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background: var(--rnd-accent);
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

.rnd-slider-value {
    width: 30px;
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    color: var(--rnd-accent);
}

/* Radar preview */
.rnd-radar-preview {
    width: 160px;
    height: 160px;
    display: flex;
    justify-content: center;
    align-items: center;
    background: var(--rnd-bg);
    border-radius: 8px;
    flex-shrink: 0;
}

.rnd-radar-preview svg {
    width: 140px;
    height: 140px;
}

/* Usages checkboxes */
.rnd-usages-checkboxes,
.rnd-roles-checkboxes {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.rnd-usage-checkbox,
.rnd-role-checkbox {
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--rnd-bg);
    border: 1px solid var(--rnd-border);
    border-radius: 6px;
    padding: 8px 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.rnd-usage-checkbox:hover,
.rnd-role-checkbox:hover {
    border-color: var(--rnd-accent);
}

.rnd-usage-checkbox input,
.rnd-role-checkbox input {
    margin: 0;
    cursor: pointer;
}

.rnd-usage-checkbox input:checked + span,
.rnd-role-checkbox input:checked + span {
    color: var(--rnd-accent);
    font-weight: 500;
}

.rnd-usage-checkbox span,
.rnd-role-checkbox span {
    font-size: 12px;
    color: var(--rnd-text-secondary);
}

/* Composition section (Module Texture) */
.rnd-composition-section h4 {
    font-size: 14px;
    font-weight: 600;
    color: var(--rnd-text);
    margin: 16px 0 12px 0;
    padding-top: 16px;
    border-top: 1px solid var(--rnd-border);
}

.rnd-composition-validation {
    margin-top: 8px;
    padding: 8px 12px;
    background: var(--rnd-bg);
    border-radius: 6px;
    border: 1px solid var(--rnd-border);
}

.rnd-composition-sum {
    font-size: 13px;
    color: var(--rnd-text-secondary);
}

.rnd-composition-sum strong {
    color: var(--rnd-text);
    font-weight: 600;
}

.rnd-composition-validation.error {
    background: rgba(255, 59, 48, 0.1);
    border-color: #ff3b30;
}

.rnd-composition-validation.error .rnd-composition-sum {
    color: #ff3b30;
}

.rnd-composition-validation.error .rnd-composition-sum strong {
    color: #ff3b30;
}

/* ============================================
   SENSORY RADAR SVG STYLES
   ============================================ */

.sensory-radar polygon.radar-bg {
    fill: none;
    stroke: #444;
    stroke-width: 0.5;
}

.sensory-radar line.radar-axis {
    stroke: #444;
    stroke-width: 0.5;
}

.sensory-radar polygon.radar-value {
    fill: rgba(201, 169, 98, 0.3);
    stroke: #c9a962;
    stroke-width: 2;
}

.sensory-radar circle.radar-point {
    fill: #c9a962;
}

.sensory-radar text.radar-label {
    font-size: 8px;
    fill: var(--rnd-text-muted, #888);
    text-anchor: middle;
}

/* Responsive ingredients */
@media (max-width: 768px) {
    .rnd-ingredients-filters {
        flex-direction: column;
    }

    .rnd-ingredients-filters .rnd-search-wrapper {
        width: 100%;
    }

    .rnd-ingredients-filters .rnd-filters {
        flex-direction: column;
        width: 100%;
    }

    .rnd-filter-select {
        width: 100%;
    }

    .rnd-ingredients-grid {
        grid-template-columns: 1fr;
    }

    .rnd-sensory-sliders-and-radar {
        flex-direction: column;
    }

    .rnd-radar-preview {
        width: 100%;
        margin-top: 16px;
    }

    .rnd-slider-row {
        flex-wrap: wrap;
    }

    .rnd-slider-row label {
        width: 100%;
        margin-bottom: 4px;
    }
}

/* ============================================
   USDA NUTRITION INTEGRATION
   ============================================ */

/* USDA Selector Modal */
.usda-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.usda-modal-content {
    background: var(--rnd-bg-card, #111);
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--rnd-border, #1a1a1a);
}

.usda-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    border-bottom: 1px solid var(--rnd-border, #1a1a1a);
}

.usda-modal-header h3 {
    margin: 0;
    color: var(--rnd-text, #fff);
    font-size: 16px;
}

.usda-modal-close {
    background: none;
    border: none;
    color: var(--rnd-text-muted, #888);
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.usda-modal-close:hover {
    color: var(--rnd-text, #fff);
}

.usda-modal-search {
    display: flex;
    gap: 8px;
    padding: 12px 16px;
}

.usda-search-input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid var(--rnd-border, #1a1a1a);
    border-radius: 6px;
    background: var(--rnd-bg, #0a0a0a);
    color: var(--rnd-text, #fff);
    font-size: 14px;
}

.usda-search-input:focus {
    outline: none;
    border-color: var(--rnd-accent, #c9a962);
}

.usda-search-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    background: var(--rnd-accent, #c9a962);
    color: var(--rnd-bg, #0a0a0a);
    cursor: pointer;
    font-weight: 500;
}

.usda-search-btn:hover {
    background: var(--rnd-accent-hover, #d4b56d);
}

.usda-translation {
    padding: 4px 16px;
    font-size: 12px;
    color: var(--rnd-text-muted, #888);
    font-style: italic;
}

.usda-candidates-container {
    flex: 1;
    overflow-y: auto;
    padding: 0 16px 16px;
}

.usda-candidate {
    padding: 12px;
    border: 1px solid var(--rnd-border, #1a1a1a);
    border-radius: 8px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.2s;
    background: rgba(255, 255, 255, 0.02);
}

.usda-candidate:hover {
    border-color: var(--rnd-accent, #c9a962);
    background: rgba(201, 169, 98, 0.1);
}

.usda-candidate.selected {
    border-color: var(--rnd-status-valid, #5fba7d);
    background: rgba(95, 186, 125, 0.1);
}

.usda-candidate-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.usda-candidate-name {
    font-weight: 500;
    color: var(--rnd-text, #fff);
    font-size: 14px;
}

.usda-candidate-score {
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
}

.usda-candidate-score.score-high {
    background: rgba(95, 186, 125, 0.2);
    color: var(--rnd-status-valid, #5fba7d);
}

.usda-candidate-score.score-medium {
    background: rgba(230, 167, 86, 0.2);
    color: var(--rnd-status-test, #e6a756);
}

.usda-candidate-score.score-low {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.usda-candidate-details {
    display: flex;
    gap: 12px;
    font-size: 12px;
    color: var(--rnd-text-muted, #888);
}

.usda-candidate-indicators {
    display: flex;
    gap: 8px;
    margin-top: 8px;
    flex-wrap: wrap;
}

.usda-indicator {
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 10px;
    background: rgba(255, 255, 255, 0.1);
    color: var(--rnd-text-secondary, #aaa);
}

.usda-indicator.risk-high {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.usda-indicator.risk-medium {
    background: rgba(230, 167, 86, 0.2);
    color: var(--rnd-status-test, #e6a756);
}

.usda-indicator.risk-low {
    background: rgba(95, 186, 125, 0.2);
    color: var(--rnd-status-valid, #5fba7d);
}

.usda-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 16px;
    border-top: 1px solid var(--rnd-border, #1a1a1a);
}

.usda-btn-cancel,
.usda-btn-select {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
}

.usda-btn-cancel {
    background: var(--rnd-bg, #0a0a0a);
    color: var(--rnd-text-muted, #888);
    border: 1px solid var(--rnd-border, #1a1a1a);
}

.usda-btn-cancel:hover {
    background: rgba(255, 255, 255, 0.05);
}

.usda-btn-select {
    background: var(--rnd-status-valid, #5fba7d);
    color: white;
}

.usda-btn-select:hover {
    background: #4da868;
}

.usda-btn-select:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.usda-loading,
.usda-no-results {
    text-align: center;
    padding: 24px;
    color: var(--rnd-text-muted, #888);
}


/* Bouton recherche USDA sur ingrédient */
.tex-usda-search-btn {
    padding: 4px 8px;
    border: 1px solid var(--rnd-border, #1a1a1a);
    border-radius: 4px;
    background: transparent;
    color: var(--rnd-text-muted, #888);
    cursor: pointer;
    font-size: 11px;
    transition: all 0.2s;
}

.tex-usda-search-btn:hover {
    border-color: var(--rnd-accent, #c9a962);
    color: var(--rnd-accent, #c9a962);
}


/* ============================================
   JAUGE D'ETAPES — Mode slim
   ============================================ */
.rnd-step-gauge--slim {
    padding: 4px 20px;
}
.rnd-step-gauge--slim .rnd-step-gauge-header {
    margin-bottom: 2px;
}
.rnd-step-gauge--slim .rnd-step-gauge-title,
.rnd-step-gauge--slim .rnd-step-gauge-current {
    font-size: 10px;
}
.rnd-step-gauge--slim .rnd-step-gauge-track {
    height: 3px;
}
.rnd-step-gauge--slim .rnd-step-gauge-marker {
    width: 8px;
    height: 8px;
    font-size: 0;
    border-width: 1.5px;
}
.rnd-step-gauge--slim .rnd-step-gauge-labels {
    display: none;
}

/* ============================================
   MENU BAR — Photoshop-like (.mb-*)
   ============================================ */
.mb-bar {
    display: flex;
    align-items: center;
    height: 36px;
    padding: 0 12px;
    background: var(--rnd-bg-card);
    border-bottom: 1px solid var(--rnd-border);
    gap: 0;
    user-select: none;
    flex-shrink: 0;
}
.mb-accueil {
    background: transparent;
    border: none;
    color: var(--rnd-accent);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    padding: 4px 10px;
    border-radius: 4px;
    transition: all 0.15s ease;
    white-space: nowrap;
}
.mb-accueil:hover {
    background: rgba(201, 169, 98, 0.12);
}
.mb-separator {
    width: 1px;
    height: 18px;
    background: var(--rnd-border);
    margin: 0 6px;
}
.mb-menu {
    position: relative;
}
.mb-menu-btn {
    background: transparent;
    border: none;
    color: var(--rnd-text-muted);
    font-size: 13px;
    padding: 6px 12px;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.15s ease;
}
.mb-menu-btn:hover,
.mb-menu.open .mb-menu-btn {
    background: rgba(255, 255, 255, 0.06);
    color: var(--rnd-text);
}
.mb-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 180px;
    background: var(--rnd-bg-card);
    border: 1px solid var(--rnd-border);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    padding: 4px 0;
    z-index: 200;
    margin-top: 2px;
}
.mb-menu.open .mb-dropdown {
    display: block;
}
.mb-item {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 8px 16px;
    background: transparent;
    border: none;
    color: var(--rnd-text);
    font-size: 13px;
    cursor: pointer;
    text-align: left;
    transition: background 0.1s ease;
}
.mb-item:hover {
    background: rgba(255, 255, 255, 0.06);
}
.mb-item.disabled {
    color: var(--rnd-text-muted);
    opacity: 0.5;
    cursor: default;
}
.mb-item.disabled:hover {
    background: transparent;
}
.mb-hint {
    display: block;
    padding: 4px 16px 6px;
    font-size: 11px;
    color: var(--rnd-text-muted);
    font-style: italic;
}
.mb-section-label {
    display: block;
    padding: 6px 16px 2px;
    font-size: 10px;
    font-weight: 700;
    color: var(--rnd-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.mb-divider {
    height: 1px;
    background: var(--rnd-border);
    margin: 4px 8px;
}
.mb-standalone-item .mb-node-icon {
    font-size: 12px;
}
/* Submenu pattern (Photoshop-style hover submenu) */
.mb-submenu-wrapper {
    position: relative;
}
.mb-has-submenu {
    justify-content: space-between;
}
.mb-submenu-arrow {
    font-size: 10px;
    opacity: 0.5;
    margin-left: auto;
}
.mb-submenu {
    display: none;
    position: absolute;
    left: 100%;
    top: 0;
    min-width: 200px;
    background: var(--rnd-bg-card);
    border: 1px solid var(--rnd-border);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    padding: 4px 0;
    z-index: 210;
}
.mb-submenu-wrapper:hover > .mb-submenu {
    display: block;
}
.mb-toggle-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    font-size: 13px;
    color: var(--rnd-text);
    cursor: pointer;
    transition: background 0.1s ease;
}
.mb-toggle-item:hover {
    background: rgba(255, 255, 255, 0.06);
}
.mb-toggle-item input[type="checkbox"] {
    accent-color: var(--rnd-accent);
    width: 14px;
    height: 14px;
}
.mb-node-item {
    gap: 8px;
}
.mb-node-icon {
    font-size: 16px;
    width: 22px;
    text-align: center;
}
.mb-spacer {
    flex: 1;
}
.mb-project-name {
    font-size: 12px;
    color: var(--rnd-text-muted);
    font-weight: 500;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ============================================
   ONGLETS CHROME — Editor Tabs (.et-*)
   ============================================ */
.et-bar {
    display: flex;
    align-items: flex-end;
    height: 32px;
    padding: 0 8px;
    background: var(--rnd-bg);
    border-bottom: 1px solid var(--rnd-border);
    gap: 2px;
    flex-shrink: 0;
    overflow-x: auto;
    overflow-y: hidden;
}
.et-bar::-webkit-scrollbar {
    height: 0;
}
.et-tab {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px 14px;
    font-size: 12px;
    color: var(--rnd-text-muted);
    background: transparent;
    border-radius: 6px 6px 0 0;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
    border: 1px solid transparent;
    border-bottom: none;
    position: relative;
    top: 1px;
}
.et-tab:hover {
    background: rgba(255, 255, 255, 0.04);
    color: var(--rnd-text);
}
.et-tab.active {
    background: var(--rnd-bg-card);
    color: var(--rnd-accent);
    border-color: var(--rnd-border);
    border-bottom-color: var(--rnd-bg-card);
}
.et-tab-label {
    pointer-events: none;
}
.et-tab-label[contenteditable="true"] {
    pointer-events: auto;
    outline: none;
    border-bottom: 1px dashed var(--rnd-accent);
    padding-bottom: 1px;
}
.et-tab-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border: none;
    background: transparent;
    color: var(--rnd-text-muted);
    font-size: 14px;
    border-radius: 3px;
    cursor: pointer;
    opacity: 0;
    transition: all 0.15s ease;
    padding: 0;
    line-height: 1;
}
.et-tab:hover .et-tab-close {
    opacity: 0.6;
}
.et-tab-close:hover {
    opacity: 1 !important;
    background: rgba(255, 255, 255, 0.1);
    color: var(--rnd-text);
}
.et-add-tab {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border: none;
    background: transparent;
    color: var(--rnd-text-muted);
    font-size: 16px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.15s ease;
    margin-left: 2px;
    margin-bottom: 2px;
    flex-shrink: 0;
}
.et-add-tab:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--rnd-accent);
}

/* ============================================
   SIDEBAR INGREDIENTS — Calques (.is-*)
   ============================================ */
.is-sidebar {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 280px;
    background: rgba(18, 18, 20, 0.98);
    border-left: 1px solid rgba(255, 255, 255, 0.06);
    z-index: 50;
    display: flex;
    flex-direction: column;
    transition: width 0.2s ease;
    overflow: hidden;
}
.is-sidebar.collapsed {
    width: 40px;
}
.is-sidebar.collapsed .is-search-wrap,
.is-sidebar.collapsed .is-layers,
.is-sidebar.collapsed .is-create-btn,
.is-sidebar.collapsed .is-create-form,
.is-sidebar.collapsed .is-title {
    display: none;
}
.is-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    flex-shrink: 0;
}
.is-title {
    font-size: 10px;
    font-weight: 600;
    color: var(--rnd-text-muted);
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.is-collapse-btn {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: var(--rnd-text-muted);
    cursor: pointer;
    border-radius: 2px;
    font-size: 8px;
    transition: all 0.15s ease;
}
.is-collapse-btn:hover {
    background: rgba(255, 255, 255, 0.06);
    color: var(--rnd-text);
}

/* Search */
.is-search-wrap {
    padding: 4px 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    position: relative;
    flex-shrink: 0;
}
.is-search-input {
    width: 100%;
    height: 24px;
    padding: 4px 8px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 2px;
    background: rgba(0, 0, 0, 0.25);
    color: var(--rnd-text);
    font-size: 11px;
    outline: none;
    box-sizing: border-box;
}
.is-search-input:focus {
    border-color: rgba(255, 255, 255, 0.15);
}
.is-search-input::placeholder {
    color: rgba(255, 255, 255, 0.25);
}
.is-search-results {
    position: absolute;
    left: 8px;
    right: 8px;
    top: 100%;
    background: rgba(22, 22, 24, 0.98);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 2px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 60;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}
.is-result {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 8px;
    cursor: pointer;
    transition: background 0.1s ease;
    font-size: 11px;
}
.is-result:hover {
    background: rgba(255, 255, 255, 0.06);
}
.is-result-label {
    color: var(--rnd-text);
}
.is-result-cat {
    font-size: 9px;
    color: var(--rnd-text-muted);
    background: rgba(255, 255, 255, 0.04);
    padding: 1px 5px;
    border-radius: 2px;
}
.is-result-empty,
.is-result-info {
    padding: 6px 8px;
    font-size: 10px;
    color: var(--rnd-text-muted);
    text-align: center;
    font-style: italic;
}
.is-result-info {
    color: var(--rnd-accent);
    font-style: normal;
}

/* Layers */
.is-layers {
    flex: 1;
    overflow-y: auto;
    min-height: 0;
    padding: 0;
}
.is-layers-empty {
    padding: 12px 8px;
    text-align: center;
    font-size: 10px;
    color: rgba(255, 255, 255, 0.25);
}
.is-layer {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    border-left: 3px solid transparent;
    transition: background 0.1s ease, border-color 0.1s ease;
    cursor: grab;
}
.is-layer:active {
    cursor: grabbing;
}
.is-layer:hover {
    background: rgba(255, 255, 255, 0.06);
    border-left-color: var(--rnd-accent);
}
.is-layer-color {
    width: 3px;
    height: 100%;
    min-height: 18px;
    border-radius: 0;
    flex-shrink: 0;
    align-self: stretch;
}
.is-layer-name {
    flex: 1;
    font-size: 11px;
    color: var(--rnd-text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.is-layer-role,
.is-layer-cat {
    font-size: 9px;
    color: rgba(255, 255, 255, 0.3);
    font-weight: 500;
    text-transform: uppercase;
    flex-shrink: 0;
}
.is-layer-delete {
    width: 14px;
    height: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: var(--rnd-text-muted);
    font-size: 10px;
    cursor: pointer;
    border-radius: 2px;
    opacity: 0.2;
    transition: all 0.15s ease;
    flex-shrink: 0;
}
.is-layer:hover .is-layer-delete {
    opacity: 0.5;
}
.is-layer-delete:hover {
    opacity: 0.8 !important;
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

/* Create button */
.is-create-btn {
    margin: 8px;
    padding: 8px 12px;
    border: 1px dashed rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--rnd-text);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
    text-align: center;
    flex-shrink: 0;
}
.is-create-btn:hover {
    border-color: var(--rnd-accent, rgba(255, 255, 255, 0.3));
    color: var(--rnd-accent, #fff);
    background: rgba(255, 255, 255, 0.08);
}

/* USDA button */
.is-usda-btn {
    white-space: nowrap;
    padding: 4px 8px;
    font-size: 10px;
    font-weight: 600;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: #fff;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    transition: opacity 0.2s;
    flex-shrink: 0;
}
.is-usda-btn:hover { opacity: 0.85; }
.is-usda-btn:disabled { opacity: 0.5; cursor: wait; }

/* Create form */
.is-create-form {
    flex: 1;
    overflow-y: auto;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
}
.is-form-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    font-size: 11px;
    font-weight: 600;
    color: var(--rnd-text-muted);
}
.is-form-close {
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: var(--rnd-text-muted);
    cursor: pointer;
    border-radius: 2px;
    font-size: 14px;
}
.is-form-close:hover {
    background: rgba(255, 255, 255, 0.06);
    color: var(--rnd-text);
}
.is-form-body {
    padding: 6px 8px 40px 8px;
}
.is-field {
    margin-bottom: 6px;
}
.is-field label {
    display: block;
    margin-bottom: 2px;
    font-size: 10px;
    color: rgba(255, 255, 255, 0.35);
}
.is-field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    margin-bottom: 6px;
}
.is-input {
    width: 100%;
    padding: 4px 6px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 2px;
    background: rgba(0, 0, 0, 0.25);
    color: var(--rnd-text);
    font-size: 11px;
    outline: none;
    box-sizing: border-box;
}
.is-input:focus {
    border-color: rgba(255, 255, 255, 0.15);
}
.is-input-sm {
    padding: 3px 5px;
    font-size: 10px;
}
.is-section-title {
    font-size: 10px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.35);
    margin: 8px 0 4px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.is-sensory-grid {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.is-sensory-row {
    display: flex;
    align-items: center;
    gap: 4px;
}
.is-sensory-label {
    min-width: 75px;
    font-size: 10px;
    color: rgba(255, 255, 255, 0.35);
}
.is-slider {
    flex: 1;
    accent-color: var(--rnd-accent);
    height: 3px;
}
.is-slider-val {
    min-width: 16px;
    text-align: right;
    font-size: 10px;
    font-weight: 600;
    color: var(--rnd-text-muted);
}
.is-checkbox-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3px;
}
.is-checkbox-label {
    display: flex;
    align-items: center;
    gap: 3px;
    padding: 2px 4px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 2px;
    cursor: pointer;
    font-size: 10px;
    color: var(--rnd-text);
}
.is-checkbox-label input[type="checkbox"] {
    accent-color: var(--rnd-accent);
    width: 11px;
    height: 11px;
}
.is-compo-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 4px;
}
.is-field-small label {
    display: block;
    margin-bottom: 1px;
    font-size: 9px;
    color: rgba(255, 255, 255, 0.3);
}
.is-compo-sum {
    margin-top: 3px;
    font-size: 9px;
    color: rgba(255, 255, 255, 0.3);
    text-align: right;
}
.is-form-actions {
    display: flex;
    gap: 6px;
    justify-content: flex-end;
    margin-top: 8px;
    padding-top: 6px;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
}
.is-form-cancel {
    padding: 4px 10px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 3px;
    background: transparent;
    color: var(--rnd-text-muted);
    font-size: 11px;
    cursor: pointer;
    transition: all 0.15s ease;
}
.is-form-cancel:hover {
    border-color: rgba(255, 255, 255, 0.15);
    color: var(--rnd-text);
}
.is-form-submit {
    padding: 4px 10px;
    border: none;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.1);
    color: var(--rnd-text);
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
}
.is-form-submit:hover {
    background: rgba(255, 255, 255, 0.15);
}
.is-form-submit:disabled {
    opacity: 0.4;
    cursor: wait;
}

/* Toast */
.is-toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: var(--rnd-bg-card);
    border: 1px solid var(--rnd-accent);
    color: var(--rnd-accent);
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 13px;
    z-index: 10001;
    opacity: 0;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}
.is-toast-visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ============================================
   FULLSCREEN — Layout avec menu bar + tabs + sidebar
   ============================================ */
body.rnd-nodes-fullscreen .rnd-header {
    display: none !important;
}

body.rnd-nodes-fullscreen .nodes-editor {
    height: 100% !important;
    width: 100%;
}


/* ============================================
   STANDALONE PROCESS STEPS (in Auto Process)
   ============================================ */
.pn-standalone-section {
    margin: 4px 0;
    border: 1px solid var(--rnd-standalone_recipe-dim);
    border-radius: 6px;
    overflow: hidden;
}
.pn-standalone-header {
    display: flex; align-items: center; gap: 6px;
    padding: 6px 10px;
    background: var(--rnd-standalone_recipe-glow);
    cursor: pointer; user-select: none;
    transition: background 0.15s;
}
.pn-standalone-header:hover { background: var(--rnd-standalone_recipe-dim); }
.pn-standalone-label {
    flex: 1; font-size: 11px; font-weight: 600;
    color: var(--rnd-standalone_recipe-soft);
}
.pn-standalone-qty { font-size: 10px; color: rgba(255,255,255,0.4); }
.pn-standalone-chevron {
    font-size: 12px; color: rgba(255,255,255,0.35);
    transition: transform 0.2s;
}
.pn-standalone-collapsed .pn-standalone-chevron { transform: rotate(-90deg); }
.pn-standalone-collapsed .pn-standalone-steps { display: none; }
.pn-standalone-step .pn-s-row {
    border-left: 2px solid var(--rnd-standalone_recipe);
}

/* Dirty tab indicator */
.et-tab-dirty {
    color: #e8a838; font-weight: bold;
    margin-left: 2px; font-size: 14px; line-height: 1;
}

/* ============================================
   SAUCE (SauceLab) — Préfixe: sa-
   ============================================ */

/* Accent line */
.node-type-sauce::before { background: var(--rnd-sauce, #e67e22); }

/* Editor fields */
.sa-fields { display: flex; flex-direction: column; gap: 10px; padding: 8px 0; }
.sa-field-row { display: flex; flex-direction: column; gap: 4px; }
.sa-field-label { font-family: 'Outfit', sans-serif; font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; color: var(--rnd-text-muted); }
.sa-select-btn { width: 100%; padding: 8px 12px; font-family: 'Outfit', sans-serif; font-size: 13px; background: var(--rnd-bg-field); border: 1px solid var(--rnd-border); border-radius: 6px; color: var(--rnd-text); cursor: pointer; text-align: left; transition: border-color 0.2s; }
.sa-select-btn:hover { border-color: var(--rnd-sauce, #e67e22); }
.sa-quantity-input { width: 100%; padding: 7px 10px; font-family: 'JetBrains Mono', monospace; font-size: 12px; background: var(--rnd-bg-input); border: 1px solid var(--rnd-border); border-radius: 5px; color: var(--rnd-text); outline: none; transition: border-color 0.2s, box-shadow 0.2s; box-sizing: border-box; }
.sa-quantity-input:focus { border-color: var(--rnd-sauce, #e67e22); box-shadow: 0 0 0 2px var(--rnd-sauce-dim, rgba(230,126,34,0.15)); }

/* Compact body */
.sa-compact-body { display: flex; flex-direction: column; gap: 4px; padding: 6px 0; }
.sa-compact-body.sa-empty { opacity: 0.5; }
.sa-recipe-name { font-family: 'Outfit', sans-serif; font-size: 13px; font-weight: 600; color: var(--rnd-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sa-base-badge { display: inline-block; font-family: 'Outfit', sans-serif; font-size: 10px; color: var(--rnd-sauce, #e67e22); background: var(--rnd-sauce-dim, rgba(230,126,34,0.1)); padding: 1px 6px; border-radius: 3px; width: fit-content; }
.sa-summary { font-family: 'Outfit', sans-serif; font-size: 11px; color: var(--rnd-text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sa-scores { display: flex; gap: 4px; flex-wrap: wrap; }
.sa-score-chip { font-family: 'JetBrains Mono', monospace; font-size: 9px; color: var(--rnd-sauce, #e67e22); background: var(--rnd-sauce-dim, rgba(230,126,34,0.08)); padding: 1px 5px; border-radius: 3px; }
.sa-weight-badge { font-family: 'JetBrains Mono', monospace; font-size: 11px; font-weight: 600; color: var(--rnd-sauce, #e67e22); }

/* Selector panel */
.sa-selector-panel { position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 380px; max-height: 480px; background: var(--rnd-bg-card, #1e1e2e); border: 1px solid var(--rnd-border); border-radius: 12px; box-shadow: 0 20px 60px rgba(0,0,0,0.5); z-index: 10000; display: flex; flex-direction: column; overflow: hidden; }
.sa-selector-header { display: flex; align-items: center; padding: 12px; border-bottom: 1px solid var(--rnd-border); gap: 8px; }
.sa-search-input { flex: 1; padding: 8px 12px; font-family: 'Outfit', sans-serif; font-size: 13px; background: var(--rnd-bg-input); border: 1px solid var(--rnd-border); border-radius: 6px; color: var(--rnd-text); outline: none; }
.sa-search-input:focus { border-color: var(--rnd-sauce, #e67e22); }
.sa-selector-close { background: none; border: none; font-size: 20px; color: var(--rnd-text-muted); cursor: pointer; padding: 4px 8px; }
.sa-selector-close:hover { color: var(--rnd-text); }
.sa-selector-list { flex: 1; overflow-y: auto; padding: 8px; }
.sa-selector-item { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: 6px; cursor: pointer; transition: background 0.1s; }
.sa-selector-item:hover { background: rgba(230,126,34,0.08); }
.sa-selector-name { font-family: 'Outfit', sans-serif; font-size: 13px; font-weight: 500; color: var(--rnd-text); }
.sa-selector-meta { font-family: 'Outfit', sans-serif; font-size: 11px; color: var(--rnd-text-muted); }
.sa-selector-empty { padding: 20px; text-align: center; font-family: 'Outfit', sans-serif; font-size: 13px; color: var(--rnd-text-muted); }

/* ========================================
   RADAR SENSORIEL REACT NODE (.rrc-*)
   ======================================== */

/* Force always-visible content (no compact toggle) — use .rrc-container parent to match any typeId slug */
.node-element:has(.rrc-container) .node-content { display: block !important; }
.node-element:has(.rrc-container) .node-compact-body { display: none !important; }
.node-element:has(.rrc-container) .node-edit-hint { display: none !important; }
/* Fallback for slug-based matching */
.node-type-radar_sensoriel .node-content { display: block !important; }
.node-type-radar_sensoriel .node-compact-body { display: none !important; }
.node-type-radar_sensoriel .node-edit-hint { display: none !important; }

/* Accent line */
.node-element:has(.rrc-container)::before,
.node-type-radar_sensoriel::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--rnd-radar_sensoriel, #6c5ce7), var(--rnd-radar_sensoriel-glow, #a29bfe));
    border-radius: 8px 8px 0 0;
    opacity: 0.8;
}

/* Container */
.rrc-container {
    position: relative;
    min-height: 160px;
}

.rrc-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 160px;
}

/* ═══════════════════════════════════════════
   Sketch React Node (skr-*)
   ═══════════════════════════════════════════ */
.skr-editor {
    padding: 4px;
}
.skr-open-btn {
    width: 100%;
    background: transparent;
    border: none;
    padding: 0;
    cursor: pointer;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.2s ease;
}
.skr-open-btn:hover {
    transform: scale(1.02);
}

/* Empty state */
.skr-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 20px 12px;
    border: 1.5px dashed rgba(168, 85, 247, 0.25);
    border-radius: 8px;
    background: linear-gradient(135deg, rgba(168,85,247,0.04) 0%, rgba(88,28,135,0.06) 100%);
    transition: all 0.25s ease;
}
.skr-open-btn:hover .skr-empty-state {
    border-color: rgba(168, 85, 247, 0.45);
    background: linear-gradient(135deg, rgba(168,85,247,0.08) 0%, rgba(88,28,135,0.10) 100%);
}
.skr-empty-icon {
    color: rgba(168, 85, 247, 0.5);
    transition: color 0.25s, transform 0.25s;
}
.skr-open-btn:hover .skr-empty-icon {
    color: rgba(168, 85, 247, 0.8);
    transform: scale(1.1);
}
.skr-empty-text {
    color: #c4b5fd;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: -0.01em;
}
.skr-empty-hint {
    color: #6b7280;
    font-size: 9px;
    letter-spacing: 0.02em;
}

/* Filled preview */
.skr-preview-filled {
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid rgba(168, 85, 247, 0.15);
}
.skr-preview-filled img {
    width: 100%;
    display: block;
}
.skr-open-btn:hover .skr-preview-filled {
    border-color: rgba(168, 85, 247, 0.4);
    box-shadow: 0 0 12px rgba(168, 85, 247, 0.1);
}

/* Compact body */
.skr-compact {
    padding: 4px;
}
.skr-compact-thumb {
    width: 100%;
    max-height: 160px;
    border-radius: 6px;
    object-fit: contain;
    border: 1px solid rgba(255,255,255,0.06);
    cursor: pointer;
    display: block;
    background: rgba(0,0,0,0.2);
}
.skr-compact-thumb:hover {
    border-color: rgba(196,181,253,0.3);
    box-shadow: 0 0 8px rgba(196,181,253,0.15);
}
