/* css/style.css - Design System et Styles pour X-ENGINEERS STUDIO */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap');

:root {
    /* Palettes de couleurs de l'application */
    --bg-main: #0f172a;          /* Slate 900 */
    --bg-card: rgba(30, 41, 59, 0.7);  /* Slate 800 with transparency */
    --bg-sidebar: #1e293b;       /* Slate 800 */
    --text-main: #f8fafc;        /* Slate 50 */
    --text-muted: #94a3b8;       /* Slate 400 */
    --primary: #c5a059;          /* Gold accent */
    --primary-hover: #b48e43;
    --accent-blue: #38bdf8;      /* Sky 400 */
    --success: #10b981;          /* Emerald 500 */
    --warning: #f59e0b;          /* Amber 500 */
    --danger: #ef4444;           /* Red 500 */
    
    --border-color: rgba(255, 255, 255, 0.08);
    --border-glow: rgba(197, 160, 89, 0.3);
    
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-glow: 0 0 20px rgba(197, 160, 89, 0.15);

    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Plus Jakarta Sans', sans-serif;
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Base reset */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    font-family: var(--font-body);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.5;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    letter-spacing: -0.02em;
}

button {
    font-family: var(--font-body);
    cursor: pointer;
    border: none;
    outline: none;
}

/* --- TEXTURES DE SOLS EN PURE CSS --- */
.floor-parquet-light {
    background-color: #f5d0a9;
    background-image: 
        linear-gradient(90deg, rgba(92,64,51,0.1) 1px, transparent 1px),
        linear-gradient(180deg, rgba(92,64,51,0.05) 50%, rgba(0,0,0,0.05) 50%);
    background-size: 80px 100%, 100% 40px;
}

.floor-parquet-dark {
    background-color: #6e4e37;
    background-image: 
        linear-gradient(90deg, rgba(26,16,10,0.15) 1px, transparent 1px),
        linear-gradient(180deg, rgba(26,16,10,0.08) 50%, rgba(0,0,0,0.08) 50%);
    background-size: 85px 100%, 100% 45px;
}

.floor-concrete {
    background-color: #a1a1aa;
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(255,255,255,0.03) 0%, transparent 40%),
        radial-gradient(circle at 80% 70%, rgba(0,0,0,0.03) 0%, transparent 40%),
        linear-gradient(to right, rgba(0,0,0,0.02) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(0,0,0,0.02) 1px, transparent 1px);
    background-size: 100% 100%, 100% 100%, 30px 30px, 30px 30px;
}

.floor-tiles-retro {
    background-color: #eae6df;
    background-image: 
        radial-gradient(circle at 50% 50%, #d89683 20%, transparent 20%),
        radial-gradient(circle at 0% 0%, #4e5d6c 15%, transparent 15%),
        radial-gradient(circle at 100% 0%, #4e5d6c 15%, transparent 15%),
        radial-gradient(circle at 100% 100%, #4e5d6c 15%, transparent 15%),
        radial-gradient(circle at 0% 100%, #4e5d6c 15%, transparent 15%);
    background-size: 40px 40px;
    background-position: 0 0, 20px 20px, 20px 20px, 20px 20px, 20px 20px;
}

.floor-carpet-cozy {
    background-color: #d1c7bd;
    background-image: 
        radial-gradient(#baa899 15%, transparent 16%),
        radial-gradient(#baa899 15%, transparent 16%);
    background-size: 8px 8px;
    background-position: 0 0, 4px 4px;
}

/* --- DASHBOARD / PAGE D'ACCUEIL (index.php) --- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-icon {
    font-size: 2.2rem;
    color: var(--primary);
    filter: drop-shadow(0 0 10px rgba(197, 160, 89, 0.4));
}

.logo-text h1 {
    font-size: 1.8rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--text-main) 30%, var(--primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.logo-text p {
    font-size: 0.85rem;
    color: var(--text-muted);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.btn-sandbox {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
    color: var(--bg-main);
    font-weight: 700;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    box-shadow: var(--shadow-glow);
    transition: var(--transition-normal);
}

.btn-sandbox:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 25px rgba(197, 160, 89, 0.35);
}

/* Section Contracts */
.section-title {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-left: 4px solid var(--primary);
    padding-left: 0.75rem;
}

.contracts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 4rem;
}

.contract-card {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.contract-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
    opacity: 0;
    transition: var(--transition-normal);
}

.contract-card:hover {
    transform: translateY(-5px);
    border-color: rgba(197, 160, 89, 0.4);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.contract-card:hover::before {
    opacity: 1;
}

.contract-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.client-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.client-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background-color: var(--bg-sidebar);
    border: 2px solid var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.client-meta h3 {
    font-size: 1.1rem;
    color: var(--text-main);
}

.client-meta p {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.difficulty-badge {
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.25rem 0.6rem;
    border-radius: 99px;
    text-transform: uppercase;
}

.difficulty-badge.facile { background-color: rgba(16, 185, 129, 0.2); color: #34d399; }
.difficulty-badge.moyen { background-color: rgba(245, 158, 11, 0.2); color: #fbbf24; }
.difficulty-badge.difficile { background-color: rgba(239, 68, 68, 0.2); color: #f87171; }

.contract-body {
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.contract-body h4 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: var(--primary);
}

.contract-body .brief-text {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.requirements-list {
    background: rgba(15, 23, 42, 0.4);
    padding: 0.75rem;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.04);
}

.requirements-list p {
    font-size: 0.8rem;
    font-weight: 700;
    margin-bottom: 0.35rem;
    color: var(--text-main);
}

.requirements-list ul {
    list-style: none;
    font-size: 0.75rem;
    color: var(--text-muted);
    padding-left: 0.25rem;
}

.requirements-list li {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.2rem;
}

.requirements-list li::before {
    content: "•";
    color: var(--primary);
}

.contract-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--border-color);
    padding-top: 1rem;
    margin-top: 1rem;
}

.budget-info p {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.budget-info h2 {
    font-size: 1.4rem;
    color: var(--success);
}

.btn-accept {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
    font-weight: 700;
    padding: 0.5rem 1.25rem;
    border-radius: 6px;
    text-decoration: none;
    transition: var(--transition-normal);
}

.btn-accept:hover {
    background: var(--primary);
    color: var(--bg-main);
    box-shadow: 0 0 15px rgba(197, 160, 89, 0.3);
}

/* Portfolio Gallery */
.gallery-section {
    margin-top: 4rem;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.portfolio-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: var(--transition-normal);
}

.portfolio-card:hover {
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-3px);
}

.portfolio-preview {
    height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    border-bottom: 1px solid var(--border-color);
    overflow: hidden;
}

.portfolio-preview .floor-preview {
    width: 100%;
    height: 100%;
    opacity: 0.7;
    position: absolute;
    top: 0;
    left: 0;
}

.portfolio-preview .preview-overlay {
    position: absolute;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

.stars-rating {
    color: #eab308;
    display: flex;
    gap: 0.15rem;
    font-size: 1.1rem;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
}

.stars-rating span {
    text-shadow: 0 1px 1px rgba(0,0,0,0.8);
}

.portfolio-details {
    padding: 1rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.portfolio-details h4 {
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.portfolio-details .client {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

.portfolio-stats {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    border-top: 1px solid rgba(255,255,255,0.05);
    padding-top: 0.5rem;
    margin-bottom: 0.75rem;
}

.portfolio-stats span {
    color: var(--text-muted);
}

.portfolio-stats strong {
    color: var(--text-main);
}

.portfolio-actions {
    display: flex;
    gap: 0.5rem;
}

.portfolio-actions button, .portfolio-actions a {
    flex: 1;
    text-align: center;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.4rem;
    border-radius: 4px;
    text-decoration: none;
}

.btn-view {
    background-color: var(--bg-sidebar);
    color: var(--text-main);
    border: 1px solid rgba(255,255,255,0.1);
    transition: var(--transition-fast);
}

.btn-view:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.btn-delete {
    background-color: rgba(239, 68, 68, 0.15);
    color: #f87171;
    transition: var(--transition-fast);
}

.btn-delete:hover {
    background-color: rgba(239, 68, 68, 0.3);
}

.empty-portfolio {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem;
    background: rgba(255, 255, 255, 0.02);
    border: 2px dashed rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    color: var(--text-muted);
}

.empty-portfolio i {
    font-size: 2.5rem;
    display: block;
    margin-bottom: 0.75rem;
}

/* --- INTERFACE DE JEU / EDITEUR (game.php) --- */
.game-container {
    display: grid;
    grid-template-columns: 320px 8px 1fr 340px;
    height: 100vh;
    overflow: hidden;
    --catalog-width: 320px;
}

/* 1. Left Sidebar: Catalogue */
.sidebar-catalog {
    background-color: var(--bg-sidebar);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.sidebar-header {
    padding: 1.25rem 1rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sidebar-header h2 {
    font-size: 1.1rem;
    font-weight: 700;
}

.btn-back-home {
    color: var(--text-muted);
    font-size: 0.8rem;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    transition: var(--transition-fast);
}

.btn-back-home:hover {
    color: var(--primary);
}

/* Catégories tabs (icônes) */
.catalog-categories {
    display: flex;
    overflow-x: auto;
    background-color: rgba(15, 23, 42, 0.4);
    border-bottom: 1px solid var(--border-color);
    scrollbar-width: none;
}

.catalog-categories::-webkit-scrollbar {
    display: none;
}

.category-tab {
    flex: 0 0 50px;
    height: 50px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    background: transparent;
    transition: var(--transition-fast);
    font-size: 1.1rem;
    border-bottom: 2px solid transparent;
}

.category-tab:hover {
    color: var(--text-main);
    background-color: rgba(255, 255, 255, 0.02);
}

.category-tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
    background-color: rgba(255, 255, 255, 0.05);
}

/* Liste d'objets du catalogue */
.catalog-list {
    flex-grow: 1;
    overflow-y: auto;
    padding: 1rem;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    align-content: start;
}

.catalog-item {
    background-color: rgba(15, 23, 42, 0.3);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 0.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    cursor: grab;
    transition: var(--transition-fast);
    user-select: none;
}

.catalog-item:hover {
    border-color: var(--primary);
    background-color: rgba(255, 255, 255, 0.02);
    transform: translateY(-2px);
}

.catalog-item-preview {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.5rem;
}

.catalog-item-info {
    width: 100%;
    text-align: center;
}

.catalog-item-name {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 0.15rem;
}

.catalog-item-price {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--success);
}

/* Barre de redimensionnement du catalogue */
.resize-divider {
    background-color: var(--border-color);
    border-left: 1px solid rgba(255, 255, 255, 0.05);
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    cursor: col-resize;
    user-select: none;
    transition: background-color 0.2s ease;
    position: relative;
}

.resize-divider:hover {
    background-color: var(--primary);
    opacity: 0.6;
}

.resize-divider::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 3px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    pointer-events: none;
}

/* 2. Center Panel: Canvas */
.center-panel {
    display: flex;
    flex-direction: column;
    height: 100%;
    background-color: #0b0f19;
    position: relative;
}

.canvas-toolbar {
    padding: 0.75rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: rgba(30, 41, 59, 0.2);
    backdrop-filter: blur(8px);
    z-index: 10;
}

.toolbar-title h3 {
    font-size: 1rem;
    color: var(--text-main);
}

.toolbar-title p {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.toolbar-actions {
    display: flex;
    gap: 0.75rem;
}

.btn-tool {
    background-color: var(--bg-sidebar);
    color: var(--text-main);
    border: 1px solid var(--border-color);
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.5rem 0.85rem;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    transition: var(--transition-fast);
}

.btn-tool:hover {
    background-color: rgba(255,255,255,0.06);
    border-color: rgba(255,255,255,0.15);
}

.btn-tool.active {
    background-color: var(--primary);
    color: var(--bg-main);
    border-color: var(--primary);
}

/* Zone d'affichage de la pièce */
.canvas-viewport {
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: auto;
    padding: 2rem;
    position: relative;
}

.room-canvas-container {
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5), var(--shadow-glow);
    border: 4px solid var(--primary);
    border-radius: 8px;
    position: relative;
    overflow: hidden;
    transition: width 0.3s ease, height 0.3s ease;
}

/* Quadrillage de fond architectural */
.room-grid-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
    background-size: 20px 20px;
    z-index: 1;
}

/* Les Meubles Placées */
.placed-furniture-item {
    position: absolute;
    cursor: move;
    transform-origin: center center;
    user-select: none;
    z-index: 5;
    touch-action: none;
}

.placed-furniture-item:hover svg {
    filter: drop-shadow(0 0 6px rgba(197, 160, 89, 0.4));
}

.placed-furniture-item.selected {
    z-index: 100 !important;
}

.placed-furniture-item.selected::after {
    content: '';
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
    border: 2px dashed var(--primary);
    border-radius: 4px;
    pointer-events: none;
    animation: border-glow-anim 1.5s infinite;
}

@keyframes border-glow-anim {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; filter: drop-shadow(0 0 4px var(--primary)); }
}

/* 3. Right Sidebar: Client & Budget */
.sidebar-brief {
    background-color: var(--bg-sidebar);
    border-left: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.client-brief-card {
    padding: 1.5rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
    background: rgba(15, 23, 42, 0.15);
}

.client-brief-card .client-avatar {
    margin-right: 0.75rem;
}

.client-brief-quote {
    font-size: 0.85rem;
    font-style: italic;
    color: var(--text-muted);
    line-height: 1.4;
    position: relative;
    padding-left: 0.75rem;
    margin-top: 1rem;
    border-left: 2px solid var(--primary);
}

.budget-tracker {
    padding: 1.5rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
}

.budget-stats {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 0.5rem;
}

.budget-stats p {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.budget-stats .amount {
    font-size: 1.3rem;
    font-weight: 800;
}

.budget-stats .amount.success { color: var(--success); }
.budget-stats .amount.warning { color: var(--warning); }
.budget-stats .amount.danger { color: var(--danger); }

.budget-bar-container {
    width: 100%;
    height: 8px;
    background-color: rgba(15, 23, 42, 0.5);
    border-radius: 99px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.budget-bar-fill {
    height: 100%;
    width: 0%;
    border-radius: 99px;
    background-color: var(--success);
    transition: width 0.3s ease, background-color 0.3s ease;
}

.requirements-tracker {
    padding: 1.5rem 1.25rem;
    flex-grow: 1;
    overflow-y: auto;
}

.requirements-tracker h4 {
    font-size: 0.9rem;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
}

.requirement-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.6rem 0.75rem;
    background-color: rgba(15, 23, 42, 0.3);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    margin-bottom: 0.6rem;
    font-size: 0.8rem;
    transition: var(--transition-fast);
}

.requirement-item.valid {
    border-color: rgba(16, 185, 129, 0.3);
    background-color: rgba(16, 185, 129, 0.05);
}

.requirement-item .check-icon {
    font-size: 0.9rem;
    font-weight: 700;
}

.requirement-item.valid .check-icon {
    color: var(--success);
}

.requirement-item.invalid .check-icon {
    color: var(--text-muted);
}

.right-sidebar-footer {
    padding: 1.25rem;
    border-top: 1px solid var(--border-color);
    background-color: rgba(15,23,42,0.2);
}

.btn-submit-design {
    width: 100%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
    color: var(--bg-main);
    font-size: 0.95rem;
    font-weight: 800;
    padding: 0.9rem;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(197, 160, 89, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: var(--transition-normal);
}

.btn-submit-design:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(197, 160, 89, 0.4);
}

/* --- CONTEXTUAL CUSTOMIZER BUBBLE (MODIFIER MEUBLE) --- */
.customizer-bubble {
    position: absolute;
    background: rgba(30, 41, 59, 0.92);
    backdrop-filter: blur(12px);
    border: 1px solid var(--primary);
    border-radius: 12px;
    padding: 0.75rem 1rem;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5), var(--shadow-glow);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    width: 260px;
    pointer-events: auto;
    font-size: 0.8rem;
    opacity: 0;
    transform: scale(0.9) translateY(10px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.customizer-bubble.active {
    opacity: 1;
    transform: scale(1) translateY(0);
}

.customizer-bubble-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    padding-bottom: 0.4rem;
}

.customizer-bubble-header strong {
    font-size: 0.85rem;
    color: var(--primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 160px;
}

.customizer-bubble-header span {
    font-size: 0.75rem;
    color: var(--success);
    font-weight: 700;
}

/* Ligne d'actions rapides */
.customizer-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.customizer-row p {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.customizer-action-btns {
    display: flex;
    gap: 0.35rem;
}

.btn-bubble-action {
    background-color: rgba(15,23,42,0.6);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    width: 28px;
    height: 28px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    transition: var(--transition-fast);
}

.btn-bubble-action:hover {
    border-color: var(--primary);
    background-color: var(--bg-sidebar);
}

.btn-bubble-action.delete {
    background-color: rgba(239, 68, 68, 0.15);
    color: #f87171;
    border-color: rgba(239, 68, 68, 0.25);
}

.btn-bubble-action.delete:hover {
    background-color: var(--danger);
    color: var(--bg-main);
    border-color: var(--danger);
}

/* Palette de couleurs */
.color-picker-palette {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 0.35rem;
    margin-top: 0.25rem;
}

.color-dot {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid transparent;
    cursor: pointer;
    transition: var(--transition-fast);
    box-shadow: inset 0 0 2px rgba(0,0,0,0.3);
}

.color-dot:hover {
    transform: scale(1.15);
}

.color-dot.active {
    border-color: var(--primary);
    box-shadow: 0 0 6px var(--primary);
}

/* --- MODAL DE NOTATION FINALE --- */
.score-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(16px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.score-modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.score-modal {
    background: var(--bg-sidebar);
    border: 2px solid var(--primary);
    box-shadow: 0 20px 50px rgba(0,0,0,0.6), var(--shadow-glow);
    border-radius: 24px;
    width: 90%;
    max-width: 580px;
    padding: 2rem;
    text-align: center;
    transform: scale(0.8);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.score-modal-overlay.active .score-modal {
    transform: scale(1);
}

.modal-avatar-container {
    position: relative;
    width: 90px;
    height: 90px;
    margin: -4rem auto 1.5rem auto;
}

.modal-client-avatar {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background-color: var(--bg-main);
    border: 4px solid var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    box-shadow: var(--shadow-glow);
}

.modal-client-quote {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 1.5rem;
}

/* Animation des Étoiles */
.stars-display {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    font-size: 2.5rem;
    color: #eab308;
    margin-bottom: 2rem;
    filter: drop-shadow(0 0 10px rgba(234, 179, 8, 0.4));
}

.star-anim {
    opacity: 0;
    transform: scale(0.3);
}

.score-modal-overlay.active .star-anim {
    animation: star-pop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.score-modal-overlay.active .star-anim:nth-child(1) { animation-delay: 0.2s; }
.score-modal-overlay.active .star-anim:nth-child(2) { animation-delay: 0.4s; }
.score-modal-overlay.active .star-anim:nth-child(3) { animation-delay: 0.6s; }
.score-modal-overlay.active .star-anim:nth-child(4) { animation-delay: 0.8s; }
.score-modal-overlay.active .star-anim:nth-child(5) { animation-delay: 1.0s; }

@keyframes star-pop {
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.feedback-details-box {
    background: rgba(15, 23, 42, 0.4);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.25rem;
    margin-bottom: 2rem;
    text-align: left;
    max-height: 220px;
    overflow-y: auto;
}

.feedback-details-box h5 {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    padding-bottom: 0.25rem;
}

.feedback-details-box ul {
    list-style: none;
    font-size: 0.9rem;
    line-height: 1.5;
}

.feedback-details-box li {
    position: relative;
    padding-left: 1.25rem;
    margin-bottom: 0.5rem;
}

.feedback-details-box li::before {
    content: "✓";
    color: var(--success);
    position: absolute;
    left: 0;
}

.feedback-details-box li.negative::before {
    content: "✗";
    color: var(--danger);
}

.btn-modal-close {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
    color: var(--bg-main);
    font-weight: 800;
    padding: 0.8rem 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(197, 160, 89, 0.25);
    transition: var(--transition-normal);
}

.btn-modal-close:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(197, 160, 89, 0.4);
}

/* Notification popups */
.toast-notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: var(--bg-sidebar);
    color: var(--text-main);
    border-left: 4px solid var(--primary);
    padding: 1rem 1.5rem;
    border-radius: 6px;
    box-shadow: var(--shadow-lg);
    z-index: 5000;
    transform: translateY(100px);
    opacity: 0;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.3s ease;
}

.toast-notification.active {
    transform: translateY(0);
    opacity: 1;
}

.toast-notification.success {
    border-left-color: var(--success);
}

.toast-notification.error {
    border-left-color: var(--danger);
}

/* Renseignements pour mobile */
@media (max-width: 1024px) {
    .game-container {
        grid-template-columns: 280px 1fr 280px;
    }
}
@media (max-width: 768px) {
    .header {
        flex-direction: column;
        gap: 1.5rem;
        text-align: center;
    }
    .contracts-grid {
        grid-template-columns: 1fr;
    }
}
