/* ============================================
   ARCHIRENDER MASTER - CSS V9.0
   ============================================ */

/* 1. CONFIGURATION DES ONGLETS (TABS) */
.active-tab {
    border-bottom: 2px solid #3b82f6;
    color: white !important;
    background: rgba(59, 130, 246, 0.05);
}

/* 2. WIDGET SOLAIRE (INTERACTIF) */
#sun-position-widget {
    position: relative;
    border: 2px solid #1e293b;
    background: radial-gradient(circle at center, #0f172a 0%, #020617 100%);
    cursor: crosshair;
    transition: border-color 0.3s ease;
}

#sun-position-widget:hover {
    border-color: #334155;
}

#sun-cursor {
    pointer-events: none;
    /* Le clic est géré par le parent */
    transform: translate(-50%, -50%);
    background: radial-gradient(circle at center, #fef08a 0%, #facc15 60%, #eab308 100%);
    box-shadow: 0 0 20px rgba(234, 179, 8, 0.5);
    border: 2px solid white;
}

/* 3. BARRE DE PROMPT & SAISIE (TOP BAR) */
#custom-prompt {
    transition: all 0.3s ease;
    background: #020617;
}

#custom-prompt:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
    background: #0f172a;
}

/* 4. CORRECTIFS DE NETTETÉ 4K & ALIGNEMENT */
#canvas-container {
    display: flex;
    align-items: center;
    justify-content: center;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

canvas {
    image-rendering: pixelated;
    /* Pour garder la précision du tracé */
    touch-action: none;
    /* Empêche le scroll pendant le dessin */
}

/* 5. ÉTATS DES BOUTONS DE QUALITÉ */
.quality-btn {
    border: 1px solid #1e293b;
    color: #64748b;
    transition: all 0.2s ease;
}

.quality-btn:hover {
    border-color: #334155;
    color: #cbd5e1;
}

.quality-btn.active {
    background-color: #2563eb !important;
    border-color: #60a5fa !important;
    color: white !important;
    box-shadow: 0 0 15px rgba(37, 99, 235, 0.3);
}

/* 6. PRESET CARDS (Grilles de boutons) */
.preset-card {
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 2px;
    border: 1px solid rgba(30, 41, 59, 0.5);
}

.preset-card:hover {
    background: rgba(30, 41, 59, 0.8);
    transform: translateY(-1px);
}

/* 7. TOOLBARS FLOTTANTES */
.backdrop-blur-md {
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

/* 8. ANIMATIONS */
@keyframes pulse-soft {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.7;
    }
}

.animate-pulse-soft {
    animation: pulse-soft 2s infinite ease-in-out;
}

/* 9. FAILSAFE LAYOUT (Si Tailwind échoue) */
aside {
    position: relative !important;
    /* Force le contexte de positionnement pour les panels absolus */
    width: 20rem;
    /* w-80 fallback */
    background-color: #020617;
    /* bg-slate-950 fallback */
}